結果
| 問題 | No.656 ゴルフ |
| コンテスト | |
| ユーザー |
youthfuldays072
|
| 提出日時 | 2018-06-22 17:59:13 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 405 bytes |
| 記録 | |
| コンパイル時間 | 1,806 ms |
| コンパイル使用メモリ | 82,400 KB |
| 実行使用メモリ | 46,876 KB |
| 最終ジャッジ日時 | 2026-03-21 02:37:55 |
| 合計ジャッジ時間 | 2,766 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 6 |
ソースコード
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Main main=new Main();
main.run();
}
void run() {
Scanner sc=new Scanner(System.in);
String str=sc.next();
String[] input=str.split("");
int sum=0;
for(String s:input) {
if(!s.equals("0")) {
sum+=10;
}else {
sum+=Integer.valueOf(s);
}
}
System.out.println(sum);
}
}
youthfuldays072