結果
問題 | No.656 ゴルフ |
ユーザー |
|
提出日時 | 2021-03-22 21:58:10 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 49 ms / 2,000 ms |
コード長 | 451 bytes |
コンパイル時間 | 5,552 ms |
コンパイル使用メモリ | 74,352 KB |
実行使用メモリ | 37,420 KB |
最終ジャッジ日時 | 2024-11-24 10:15:31 |
合計ジャッジ時間 | 4,725 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
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); } }