結果

問題 No.1070 Missing a space
コンテスト
ユーザー sasa
提出日時 2025-03-18 09:12:50
言語 C
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 0 ms / 1,000 ms
+ 834µs
コード長 222 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 59 ms
コンパイル使用メモリ 39,680 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-23 16:20:42
合計ジャッジ時間 1,140 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>
#include <string.h>

int main(){
    char str[1000000];
    scanf("%s",str);
	int count = 0; 
    for(int i = 1;i < (int)strlen(str);i++){
		if(str[i] != '0'){
			count++;
		}
	}
	printf("%d",count);  
}
0