結果

問題 No.785 色食い虫
ユーザー htensaihtensai
提出日時 2019-12-07 12:11:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 520 bytes
コンパイル時間 2,511 ms
コンパイル使用メモリ 72,204 KB
実行使用メモリ 56,516 KB
最終ジャッジ日時 2023-08-26 08:36:13
合計ジャッジ時間 8,060 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,972 KB
testcase_01 AC 117 ms
56,272 KB
testcase_02 AC 118 ms
56,020 KB
testcase_03 AC 116 ms
56,112 KB
testcase_04 AC 117 ms
56,116 KB
testcase_05 AC 116 ms
55,708 KB
testcase_06 AC 115 ms
55,544 KB
testcase_07 AC 118 ms
56,116 KB
testcase_08 AC 116 ms
56,032 KB
testcase_09 AC 116 ms
55,712 KB
testcase_10 AC 117 ms
55,832 KB
testcase_11 AC 115 ms
55,788 KB
testcase_12 AC 117 ms
55,728 KB
testcase_13 AC 117 ms
56,388 KB
testcase_14 AC 114 ms
55,832 KB
testcase_15 AC 114 ms
55,948 KB
testcase_16 AC 118 ms
54,212 KB
testcase_17 AC 116 ms
55,864 KB
testcase_18 AC 116 ms
56,516 KB
testcase_19 AC 121 ms
56,308 KB
testcase_20 AC 116 ms
56,236 KB
testcase_21 AC 115 ms
56,292 KB
testcase_22 AC 116 ms
55,920 KB
testcase_23 AC 118 ms
55,848 KB
testcase_24 AC 115 ms
56,088 KB
testcase_25 AC 116 ms
56,192 KB
testcase_26 AC 117 ms
55,992 KB
testcase_27 AC 116 ms
56,120 KB
testcase_28 AC 115 ms
56,248 KB
testcase_29 AC 117 ms
55,856 KB
testcase_30 AC 116 ms
56,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
 	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int r = 16;
		String rstr = sc.nextLine();
		if (!rstr.equals("NONE")) {
		    r -= rstr.split(",").length;
		}
		int g = 16;
		String gstr = sc.nextLine();
		if (!gstr.equals("NONE")) {
		    g -= gstr.split(",").length;
		}
		int b = 16;
		String bstr = sc.nextLine();
		if (!bstr.equals("NONE")) {
		    b -= bstr.split(",").length;
		}
	    System.out.println(r * r * g * g * b * b);
   }
}
0