結果

問題 No.661 ハローキティはりんご3個分
ユーザー AQUA16573837AQUA16573837
提出日時 2018-03-11 23:02:10
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 248 ms
コンパイル使用メモリ 38,040 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-08-05 02:38:07
合計ジャッジ時間 802 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <algorithm>

int main() {
	int n, a;
	scanf("%d", &n);

	for (int i = 0; i < n; i++) {
		scanf("%d", &a);
		if (a % 8 == 0 || a % 10 == 0) {
			if (a % 8 == 0)
				printf("iki");
			if (a % 10 == 0)
				printf("sugi");
			printf("\n");
		} else {
			printf("%d\n", a / 3);
		}
	}
}
0