結果

問題 No.785 色食い虫
ユーザー neko_the_shadowneko_the_shadow
提出日時 2019-02-09 11:51:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 527 bytes
コンパイル時間 1,910 ms
コンパイル使用メモリ 71,408 KB
実行使用メモリ 57,672 KB
最終ジャッジ日時 2023-09-14 11:08:15
合計ジャッジ時間 6,974 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,692 KB
testcase_01 AC 119 ms
57,248 KB
testcase_02 AC 116 ms
56,004 KB
testcase_03 AC 118 ms
56,280 KB
testcase_04 AC 117 ms
55,912 KB
testcase_05 AC 118 ms
55,528 KB
testcase_06 AC 119 ms
55,688 KB
testcase_07 AC 119 ms
55,968 KB
testcase_08 AC 119 ms
56,268 KB
testcase_09 AC 119 ms
56,236 KB
testcase_10 AC 118 ms
55,868 KB
testcase_11 AC 122 ms
56,256 KB
testcase_12 AC 120 ms
56,276 KB
testcase_13 AC 118 ms
56,120 KB
testcase_14 AC 118 ms
56,084 KB
testcase_15 AC 117 ms
56,104 KB
testcase_16 AC 118 ms
55,680 KB
testcase_17 AC 118 ms
55,912 KB
testcase_18 AC 119 ms
56,204 KB
testcase_19 AC 118 ms
56,176 KB
testcase_20 AC 120 ms
57,672 KB
testcase_21 AC 121 ms
56,344 KB
testcase_22 AC 117 ms
55,804 KB
testcase_23 AC 118 ms
55,740 KB
testcase_24 AC 119 ms
55,628 KB
testcase_25 AC 117 ms
55,516 KB
testcase_26 AC 120 ms
55,768 KB
testcase_27 AC 119 ms
53,516 KB
testcase_28 AC 120 ms
55,712 KB
testcase_29 AC 119 ms
55,704 KB
testcase_30 AC 117 ms
55,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner stdin = new Scanner(System.in);
        int r = readline(stdin);
        int g = readline(stdin);
        int b = readline(stdin);
        int ans = (16 - r) * (16 - r) * (16 - g) * (16 - g) * (16 - b) * (16 - b);
        System.out.println(ans);
    }
    
    public static int readline(Scanner stdin) {
        String line = stdin.nextLine();
        return line.equals("NONE") ? 0 : line.split(",").length;
    }
}
0