結果

問題 No.785 色食い虫
ユーザー Guest
提出日時 2019-11-30 01:09:32
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 356 bytes
コンパイル時間 1,279 ms
コンパイル使用メモリ 60,700 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-21 00:25:12
合計ジャッジ時間 2,444 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<math.h>
using namespace std;

int main() {
	string rgb[3];
	string code = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F";
	int ans = 1;
	for (int i = 0; i < 3; i++) {
		cin >> rgb[i];
		if (rgb[i] == "NONE") {
			ans *= pow(16, 2);
		}
		else {
			ans *= pow((code.length() - rgb[i].length()) / 2, 2);
		}
	}
	cout << ans;
}
0