結果
問題 | No.656 ゴルフ |
ユーザー |
![]() |
提出日時 | 2018-05-24 18:41:14 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 118 ms / 2,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 2,178 ms |
コンパイル使用メモリ | 74,464 KB |
実行使用メモリ | 41,656 KB |
最終ジャッジ日時 | 2024-06-28 17:30:30 |
合計ジャッジ時間 | 3,872 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); int result =0; for (int i=0;i<9 ;i++ ) { int k = Integer.parseInt(s.substring(i,i+1)); if (k==0) { result+=10; }else { result+=k; } } System.out.println(result); } }