結果

問題 No.250 atetubouのzetubou
ユーザー bal4ubal4u
提出日時 2019-07-15 08:33:32
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 838 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 29,376 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-17 07:43:19
合計ジャッジ時間 1,491 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1 ms
4,380 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 0 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: 関数 ‘in’ 内:
main.c:9:14: 警告: 関数 ‘getchar_unlocked’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    9 | #define gc() getchar_unlocked()
      |              ^~~~~~~~~~~~~~~~
main.c:16:28: 備考: in expansion of macro ‘gc’
   16 |         int n = 0; int c = gc();
      |                            ^~
main.c: 関数 ‘outs’ 内:
main.c:10:15: 警告: 関数 ‘putchar_unlocked’ の暗黙的な宣言です [-Wimplicit-function-declaration]
   10 | #define pc(c) putchar_unlocked(c)
      |               ^~~~~~~~~~~~~~~~
main.c:27:33: 備考: in expansion of macro ‘pc’
   27 | void outs(char *s) { while (*s) pc(*s++); pc('\n'); }
      |                                 ^~

ソースコード

diff #

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

#include <stdio.h>
#include <stdlib.h>

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

ll In() {   // 非負整数の入力
	ll n = 0; int c = gc();
	do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');
	return n;
}

void outs(char *s) { while (*s) pc(*s++); pc('\n'); }

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