結果

問題 No.250 atetubouのzetubou
ユーザー FF256grhy
提出日時 2015-07-25 00:10:08
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 239 ms
コンパイル使用メモリ 22,912 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-16 03:07:35
合計ジャッジ時間 1,217 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15 WA * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%d", &q);
      |         ~~~~~^~~~~~~~~~
main.cpp:8:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |                 scanf("%d%d%lf", &d, &x, &t);
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void) {
	int i, q, d, x;
	double t;
	scanf("%d", &q);
	for(i = 0; i < q; i++) {
		scanf("%d%d%lf", &d, &x, &t);
		double a = 1;
		int j;
		for(j = 1; j < d; j++) { a *= (double)(x + j) / j; }
		printf("%s\n", (a <= t) ? "AC" : "ZETUBOU");
	}
	return 0;
}
// そもそもこの計算式合ってるのか知らん
0