結果
| 問題 | No.509 塗りつぶしツール |
| コンテスト | |
| ユーザー |
tenten
|
| 提出日時 | 2020-09-08 14:25:12 |
| 言語 | Java (openjdk 27 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 1,435 ms |
| コンパイル使用メモリ | 85,496 KB |
| 実行使用メモリ | 45,256 KB |
| 最終ジャッジ日時 | 2026-10-02 02:15:24 |
| 合計ジャッジ時間 | 5,138 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_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