結果

問題 No.250 atetubouのzetubou
ユーザー face4
提出日時 2018-05-13 14:57:13
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 74 ms / 5,000 ms
コード長 477 bytes
コンパイル時間 543 ms
コンパイル使用メモリ 64,504 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-28 10:01:21
合計ジャッジ時間 1,961 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

typedef long long ll;

int main(){
    int q;
    cin >> q;

    ll d,x,t,times;
    while(q-- > 0){
        cin >> d >> x >> t;
        times = 1;

        for(int i = 1; i <= d-1; i++){
            times = times * (x+i) / i;
            if(times > t || times > 1e15){
                break;
            }
        }
        if(times <= t)  cout << "AC" << endl;
        else            cout << "ZETUBOU" << endl;
    }

    return 0;
}
0