結果
問題 | No.785 色食い虫 |
ユーザー |
![]() |
提出日時 | 2020-01-26 17:01:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 361 bytes |
コンパイル時間 | 1,687 ms |
コンパイル使用メモリ | 166,628 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 11:08:26 |
合計ジャッジ時間 | 2,704 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string R, G, B; cin >> R >> G >> B; int r = R == "NONE"? 16: 16 - ceil((double)R.size() / 2); int g = G == "NONE"? 16: 16 - ceil((double)G.size() / 2); int b = B == "NONE"? 16: 16 - ceil((double)B.size() / 2); int ans = (r * r) * (g * g) * (b * b); printf("%d\n", ans); return 0; }