結果

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

ソースコード

diff #

#include <stdio.h>

int main()
{
	int n = 1;
	for (int i = 0; i < 3; i++) {
		char s[32];
		fgets(s, 32, stdin);
		int m = 16;
		if (s[0] != 'N') {
			m--;
			for (char *t = s; *t; t++)
				if (*t == ',')
					m--;
		}
		n *= m*m;
	}
	printf("%d\n", n);

	return 0;
}
0