結果

問題 No.509 塗りつぶしツール
ユーザー tentententen
提出日時 2020-09-08 14:25:12
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 2,372 ms
コンパイル使用メモリ 74,128 KB
実行使用メモリ 41,648 KB
最終ジャッジ日時 2024-11-29 15:51:05
合計ジャッジ時間 7,342 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 16
権限があれば一括ダウンロードができます

ソースコード

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