結果
| 問題 | No.785 色食い虫 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-02-09 17:03:36 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 382 bytes |
| 記録 | |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 37,824 KB |
| 最終ジャッジ日時 | 2026-02-22 02:28:20 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <stdio.h>
#include <string.h>
int main(void)
{
char RGB[32];
int i, ans;
for (i = 0; i < 3; ++i) {
scanf("%s", RGB);
if (strcmp(RGB, "NONE") == 0) {
if (i) ans *= 16;
else ans = 16;
}
else {
int length = strlen(RGB);
if (i) ans *= (32 - length) / 2;
else ans = (32 - length) / 2;
}
}
printf("%d", ans * ans);
return 0;
}