結果
問題 | No.509 塗りつぶしツール |
ユーザー |
![]() |
提出日時 | 2019-12-19 13:57:44 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 460 bytes |
コンパイル時間 | 2,008 ms |
コンパイル使用メモリ | 73,536 KB |
実行使用メモリ | 37,140 KB |
最終ジャッジ日時 | 2024-07-07 01:08:55 |
合計ジャッジ時間 | 3,939 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 18 |
ソースコード
import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); char[] arr = br.readLine().toCharArray(); int[] counts = new int[]{3, 2, 2, 2, 3, 3, 3, 2, 4, 3}; long total = 1; for (char c : arr) { total += counts[c - '0']; } System.out.println(total); } }