結果
| 問題 | No.509 塗りつぶしツール |
| コンテスト | |
| ユーザー |
htensai
|
| 提出日時 | 2019-11-17 19:17:06 |
| 言語 | Java (openjdk 25.0.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 378 bytes |
| 記録 | |
| コンパイル時間 | 5,080 ms |
| コンパイル使用メモリ | 82,924 KB |
| 実行使用メモリ | 56,204 KB |
| 最終ジャッジ日時 | 2024-09-25 06:03:18 |
| 合計ジャッジ時間 | 7,481 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 16 |
ソースコード
import java.util.*;
public class Main {
public static void main (String[] args) throws Exception {
int[] counts = new int[]{3, 2, 2, 2, 3, 2, 3, 2, 4, 3};
Scanner sc = new Scanner(System.in);
char[] arr = sc.next().toCharArray();
int total = 1;
for (int i = 0; i < arr.length; i++) {
total += counts[arr[i] - '0'];
}
System.out.println(total);
}
}
htensai