結果

問題 No.509 塗りつぶしツール
ユーザー tentententen
提出日時 2020-09-08 14:25:12
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 2,532 ms
コンパイル使用メモリ 74,908 KB
実行使用メモリ 54,528 KB
最終ジャッジ日時 2024-05-07 03:18:46
合計ジャッジ時間 7,911 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
53,984 KB
testcase_01 AC 134 ms
53,848 KB
testcase_02 AC 137 ms
54,204 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 139 ms
53,708 KB
testcase_07 WA -
testcase_08 AC 140 ms
54,148 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 135 ms
53,780 KB
testcase_15 WA -
testcase_16 AC 133 ms
53,960 KB
testcase_17 WA -
testcase_18 AC 136 ms
54,172 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 136 ms
53,948 KB
testcase_23 AC 131 ms
53,700 KB
testcase_24 AC 128 ms
54,016 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 128 ms
53,992 KB
testcase_28 AC 130 ms
53,728 KB
testcase_29 AC 133 ms
54,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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);
    }
}
0