結果

問題 No.785 色食い虫
ユーザー GrenacheGrenache
提出日時 2019-04-26 18:03:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 878 bytes
コンパイル時間 3,533 ms
コンパイル使用メモリ 73,984 KB
実行使用メモリ 57,896 KB
最終ジャッジ日時 2023-08-16 06:50:31
合計ジャッジ時間 9,360 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,392 KB
testcase_01 AC 120 ms
55,512 KB
testcase_02 AC 121 ms
55,944 KB
testcase_03 AC 119 ms
55,784 KB
testcase_04 AC 121 ms
55,740 KB
testcase_05 AC 119 ms
55,620 KB
testcase_06 AC 119 ms
55,388 KB
testcase_07 AC 119 ms
55,852 KB
testcase_08 AC 122 ms
56,084 KB
testcase_09 AC 120 ms
55,400 KB
testcase_10 AC 121 ms
55,736 KB
testcase_11 AC 121 ms
55,540 KB
testcase_12 AC 123 ms
55,704 KB
testcase_13 AC 122 ms
57,896 KB
testcase_14 AC 120 ms
55,796 KB
testcase_15 AC 121 ms
55,620 KB
testcase_16 AC 126 ms
55,440 KB
testcase_17 AC 125 ms
55,644 KB
testcase_18 AC 119 ms
55,784 KB
testcase_19 AC 120 ms
55,612 KB
testcase_20 AC 119 ms
55,580 KB
testcase_21 AC 119 ms
55,620 KB
testcase_22 AC 120 ms
55,992 KB
testcase_23 AC 120 ms
55,680 KB
testcase_24 AC 123 ms
55,552 KB
testcase_25 AC 123 ms
55,540 KB
testcase_26 AC 122 ms
55,816 KB
testcase_27 AC 122 ms
55,772 KB
testcase_28 AC 125 ms
55,748 KB
testcase_29 AC 123 ms
55,728 KB
testcase_30 AC 123 ms
55,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.Scanner;


public class Main_yukicoder785 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		String R = sc.next();
		String G = sc.next();
		String B = sc.next();
		int nR = (R.length() + 1) / 2;
		int nG = (G.length() + 1) / 2;
		int nB = (B.length() + 1) / 2;

		int r = R.length() == 4 ? 256 : 256 - 16 * nR - nR * (16 - nR);
		int g = G.length() == 4 ? 256 : 256 - 16 * nG - nG * (16 - nG);
		int b = B.length() == 4 ? 256 : 256 - 16 * nB - nB * (16 - nB);

		pr.println(r * g * b);
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0