結果
| 問題 | No.509 塗りつぶしツール |
| コンテスト | |
| ユーザー |
tenten
|
| 提出日時 | 2020-09-08 14:25:12 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 1,885 ms |
| コンパイル使用メモリ | 82,472 KB |
| 実行使用メモリ | 46,708 KB |
| 最終ジャッジ日時 | 2026-05-23 10:27:35 |
| 合計ジャッジ時間 | 4,841 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 16 |
ソースコード
import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int[] counts = new int[]{3, 2, 2, 2, 3, 2, 3, 2, 4, 3};
char[] arr = sc.next().toCharArray();
int sum = 0;
for (char c : arr) {
sum += counts[c - '0'];
}
System.out.println(sum + 1);
}
}
tenten