結果

問題 No.2016 Countdown Divisors
ユーザー pengin_2000pengin_2000
提出日時 2022-08-10 23:11:46
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 573 ms
コンパイル使用メモリ 29,488 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 07:53:51
合計ジャッジ時間 3,446 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 18 ms
4,348 KB
testcase_02 AC 18 ms
4,348 KB
testcase_03 AC 16 ms
4,348 KB
testcase_04 AC 14 ms
4,348 KB
testcase_05 AC 13 ms
4,348 KB
testcase_06 AC 6 ms
4,348 KB
testcase_07 AC 5 ms
4,348 KB
testcase_08 AC 16 ms
4,348 KB
testcase_09 AC 17 ms
4,348 KB
testcase_10 AC 16 ms
4,348 KB
testcase_11 AC 16 ms
4,348 KB
testcase_12 AC 16 ms
4,348 KB
testcase_13 AC 12 ms
4,348 KB
testcase_14 AC 12 ms
4,348 KB
testcase_15 AC 12 ms
4,348 KB
testcase_16 AC 15 ms
4,348 KB
testcase_17 AC 14 ms
4,348 KB
testcase_18 AC 15 ms
4,348 KB
testcase_19 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
int main()
{
	int t;
	scanf("%d", &t);
	int n;
	int i, a[6] = { 1,3,4,5,7,8 }, f;
	for (; t > 0; t--)
	{
		scanf("%d", &n);
		f = 0;
		for (i = 0; i < 6; i++)
			if (n == a[i])
				f++;
		if (f > 0)
			printf("1\n");
		else
			printf("2\n");
	}
	return 0;
}
0