結果

問題 No.250 atetubouのzetubou
ユーザー bal4ubal4u
提出日時 2019-07-15 08:14:17
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 53 ms / 5,000 ms
コード長 547 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 29,824 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-04 13:39:51
合計ジャッジ時間 2,092 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 4 ms
5,376 KB
testcase_03 AC 4 ms
5,376 KB
testcase_04 AC 4 ms
5,376 KB
testcase_05 AC 3 ms
5,376 KB
testcase_06 AC 3 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 4 ms
5,376 KB
testcase_09 AC 3 ms
5,376 KB
testcase_10 AC 3 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 3 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 51 ms
5,376 KB
testcase_16 AC 52 ms
5,376 KB
testcase_17 AC 52 ms
5,376 KB
testcase_18 AC 53 ms
5,376 KB
testcase_19 AC 51 ms
5,376 KB
testcase_20 AC 1 ms
5,376 KB
testcase_21 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function 'in':
main.c:8:14: warning: implicit declaration of function 'getchar_unlocked' [-Wimplicit-function-declaration]
    8 | #define gc() getchar_unlocked()
      |              ^~~~~~~~~~~~~~~~
main.c:13:27: note: in expansion of macro 'gc'
   13 |         ll n = 0; int c = gc();
      |                           ^~

ソースコード

diff #

// yukicoder: No.250 atetubouのzetubou
// 2019.7.15 bal4u

#include <stdio.h>

typedef long long ll;
#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif
ll in() {   // 非負整数の入力
	ll n = 0; int c = gc();
	do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');
	return n;
}

int main()
{
	int i, Q, D, X; ll T, ans;
	
	Q = in(); while (Q--) {
		D = (int)in(), X = (int)in(), T = in();
		ans = 1; for (i = 1; i < D; i++) {
			if ((ans = ans*(X+i)/i) > T) break;
		}
		puts(ans <= T? "AC": "ZETUBOU");
	}
	return 0;
}
0