結果

問題 No.1070 Missing a space
ユーザー 遭難者遭難者
提出日時 2020-12-31 20:34:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 1,000 ms
コード長 334 bytes
コンパイル時間 3,128 ms
コンパイル使用メモリ 74,568 KB
実行使用メモリ 41,816 KB
最終ジャッジ日時 2024-04-18 02:09:40
合計ジャッジ時間 3,639 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
41,244 KB
testcase_01 AC 121 ms
41,336 KB
testcase_02 AC 120 ms
41,520 KB
testcase_03 AC 108 ms
41,372 KB
testcase_04 AC 122 ms
41,348 KB
testcase_05 AC 122 ms
41,612 KB
testcase_06 AC 109 ms
41,740 KB
testcase_07 AC 122 ms
41,428 KB
testcase_08 AC 122 ms
41,816 KB
testcase_09 AC 121 ms
41,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		char[] s = sc.next().toCharArray();
		int n = s.length - 1;
		for(char i : s) if(i == '0') n--;
		ou.println(n);
		ou.flush();
		sc.close();
	}
}
0