結果

問題 No.112 ややこしい鶴亀算
ユーザー YatsukuYatsuku
提出日時 2015-11-17 00:33:38
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 197 ms
コンパイル使用メモリ 25,628 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-11 17:04:18
合計ジャッジ時間 1,382 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,352 KB
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,352 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 2 ms
4,352 KB
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 2 ms
4,352 KB
testcase_13 WA -
testcase_14 AC 1 ms
4,348 KB
testcase_15 WA -
testcase_16 AC 1 ms
4,348 KB
testcase_17 WA -
testcase_18 AC 2 ms
4,348 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 1 ms
4,348 KB
testcase_22 AC 1 ms
4,352 KB
testcase_23 AC 1 ms
4,348 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(void)
{
	int num;
	int animal[50] = {0};
	int bird = 0, turtle = 0;
	int i;

	scanf("%d", &num);

	for ( i = 1; i <= num; i++ ) {
		scanf("%d", &animal[i]);
	}

	for ( i = 1; i <= num; i++ ) {
		if ( animal[i] % 4 == 0 ) {
			turtle++;
		} else {
			bird++;
		}
	}

	printf("%d %d\n", turtle, bird);

	return 0;
}
0