結果

問題 No.656 ゴルフ
ユーザー shinwisteriashinwisteria
提出日時 2018-03-04 10:18:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 5,644 ms
コンパイル使用メモリ 71,860 KB
実行使用メモリ 56,200 KB
最終ジャッジ日時 2023-09-20 20:35:07
合計ジャッジ時間 5,236 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
56,108 KB
testcase_01 AC 116 ms
55,800 KB
testcase_02 AC 116 ms
56,200 KB
testcase_03 AC 116 ms
55,728 KB
testcase_04 AC 116 ms
56,012 KB
testcase_05 AC 117 ms
56,160 KB
testcase_06 AC 117 ms
55,616 KB
testcase_07 AC 115 ms
54,308 KB
testcase_08 AC 115 ms
55,564 KB
testcase_09 AC 115 ms
55,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con656 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String score = s.next();
		s.close();

		int count = 0;
		for(int i = 0;i < 9;i++){
			int k = Integer.parseInt(score.substring(i, i+1));
			if(k == 0){
				count += 10;
			}else{
				count += k;
			}
		}
		System.out.println(count);

	}

}
0