結果
問題 | No.656 ゴルフ |
ユーザー |
![]() |
提出日時 | 2018-03-02 22:22:12 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 126 ms / 2,000 ms |
コード長 | 388 bytes |
コンパイル時間 | 2,181 ms |
コンパイル使用メモリ | 75,068 KB |
実行使用メモリ | 41,540 KB |
最終ジャッジ日時 | 2024-06-13 03:01:52 |
合計ジャッジ時間 | 3,895 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
import java.util.*; import static java.lang.System.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String s = sc.next(); int total = 0; int temp; for (int i=0; i<s.length(); i++) { temp = Character.getNumericValue(s.charAt(i)); if (temp==0) {total += 10;} else {total += temp;} } out.println(total); } }