結果

問題 No.785 色食い虫
ユーザー tsunabittsunabit
提出日時 2019-07-10 21:20:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 499 bytes
コンパイル時間 4,833 ms
コンパイル使用メモリ 75,260 KB
実行使用メモリ 54,264 KB
最終ジャッジ日時 2024-04-24 01:25:08
合計ジャッジ時間 9,322 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
53,884 KB
testcase_01 AC 130 ms
54,044 KB
testcase_02 AC 134 ms
54,160 KB
testcase_03 AC 131 ms
54,264 KB
testcase_04 AC 129 ms
53,944 KB
testcase_05 AC 114 ms
52,756 KB
testcase_06 AC 130 ms
54,136 KB
testcase_07 AC 130 ms
54,232 KB
testcase_08 AC 129 ms
54,004 KB
testcase_09 AC 132 ms
53,648 KB
testcase_10 AC 130 ms
53,988 KB
testcase_11 AC 130 ms
54,244 KB
testcase_12 AC 132 ms
53,980 KB
testcase_13 AC 128 ms
54,072 KB
testcase_14 AC 128 ms
54,028 KB
testcase_15 AC 127 ms
54,232 KB
testcase_16 AC 129 ms
53,932 KB
testcase_17 AC 132 ms
53,604 KB
testcase_18 AC 129 ms
53,844 KB
testcase_19 AC 129 ms
53,828 KB
testcase_20 AC 129 ms
54,108 KB
testcase_21 AC 129 ms
53,864 KB
testcase_22 AC 132 ms
54,012 KB
testcase_23 AC 128 ms
53,880 KB
testcase_24 AC 131 ms
53,992 KB
testcase_25 AC 127 ms
54,200 KB
testcase_26 AC 130 ms
54,200 KB
testcase_27 AC 130 ms
53,852 KB
testcase_28 AC 129 ms
53,876 KB
testcase_29 AC 127 ms
53,820 KB
testcase_30 AC 127 ms
53,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No785 {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String R = sc.next(), G = sc.next(), B = sc.next();
    	int r = "NONE".equals(R)? 16 : 16 - R.replaceAll(",", "").length();
    	int g = "NONE".equals(G)? 16 : 16 - G.replaceAll(",", "").length();
    	int b = "NONE".equals(B)? 16 : 16 - B.replaceAll(",", "").length();
    	System.out.println(r * r * g * g * b * b);
    }
}
0