結果

問題 No.785 色食い虫
ユーザー Mcpu3
提出日時 2019-02-09 17:03:36
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 382 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 29,184 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-01 19:14:34
合計ジャッジ時間 1,062 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0