結果
問題 |
No.785 色食い虫
|
ユーザー |
|
提出日時 | 2019-07-10 21:20:13 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 133 ms / 2,000 ms |
コード長 | 499 bytes |
コンパイル時間 | 5,772 ms |
コンパイル使用メモリ | 77,844 KB |
実行使用メモリ | 54,344 KB |
最終ジャッジ日時 | 2024-11-06 08:01:53 |
合計ジャッジ時間 | 8,899 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
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); } }