結果
問題 |
No.785 色食い虫
|
ユーザー |
![]() |
提出日時 | 2020-01-03 10:17:14 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 361 bytes |
コンパイル時間 | 109 ms |
コンパイル使用メモリ | 29,184 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 18:57:46 |
合計ジャッジ時間 | 992 ms |
ジャッジサーバーID (参考情報) |
judge3 / 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; }