結果
| 問題 |
No.785 色食い虫
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-09 21:35:30 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 356 bytes |
| コンパイル時間 | 703 ms |
| コンパイル使用メモリ | 60,248 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-23 06:12:53 |
| 合計ジャッジ時間 | 1,661 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#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;
}