結果

問題 No.656 ゴルフ
ユーザー YOSHIYOSHI
提出日時 2021-03-22 21:58:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 451 bytes
コンパイル時間 3,344 ms
コンパイル使用メモリ 73,288 KB
実行使用メモリ 36,916 KB
最終ジャッジ日時 2024-05-03 10:57:27
合計ジャッジ時間 4,398 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
36,840 KB
testcase_01 AC 50 ms
36,772 KB
testcase_02 AC 51 ms
36,488 KB
testcase_03 AC 50 ms
36,916 KB
testcase_04 AC 51 ms
36,796 KB
testcase_05 AC 51 ms
36,528 KB
testcase_06 AC 49 ms
36,860 KB
testcase_07 AC 51 ms
36,900 KB
testcase_08 AC 49 ms
36,860 KB
testcase_09 AC 51 ms
36,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No00000656_Main {
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args) throws IOException {
		String s = br.readLine();
		int c = 0;
		for(int i = 0; i < s.length(); i++) {
			int t = s.charAt(i) - '0';
			if(t == 0) c += 10;
			else c += t;
		}
		System.out.println(c);
	}
}
0