結果
| 問題 | No.250 atetubouのzetubou | 
| コンテスト | |
| ユーザー |  FF256grhy | 
| 提出日時 | 2015-07-25 00:48:36 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 26 ms / 5,000 ms | 
| コード長 | 340 bytes | 
| コンパイル時間 | 427 ms | 
| コンパイル使用メモリ | 30,592 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-16 04:08:12 | 
| 合計ジャッジ時間 | 1,475 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 20 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%d", &q);
      |         ~~~~~^~~~~~~~~~
main.cpp:9:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |                 scanf("%d%d%lf", &d, &x, &t);
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#include <math.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 *= x + j;
			a /= j;
			if(t < a - 1) { break; }
		}
		printf("%s\n", ( round(a) <= t) ? "AC" : "ZETUBOU");
	}
	return 0;
}
            
            
            
        