結果
| 問題 | No.785 色食い虫 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-26 18:03:49 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 127 ms / 2,000 ms |
| コード長 | 878 bytes |
| 記録 | |
| コンパイル時間 | 3,216 ms |
| コンパイル使用メモリ | 77,864 KB |
| 実行使用メモリ | 54,400 KB |
| 最終ジャッジ日時 | 2024-11-24 18:06:46 |
| 合計ジャッジ時間 | 7,874 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
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);
}
}
}