結果

問題 No.250 atetubouのzetubou
ユーザー 0w10w1
提出日時 2016-11-26 14:46:19
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 333 ms / 5,000 ms
コード長 551 bytes
コンパイル時間 1,468 ms
コンパイル使用メモリ 165,552 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-18 07:48:31
合計ジャッジ時間 5,903 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 191 ms
4,376 KB
testcase_01 AC 34 ms
4,376 KB
testcase_02 AC 294 ms
4,376 KB
testcase_03 AC 333 ms
4,380 KB
testcase_04 AC 291 ms
4,376 KB
testcase_05 AC 300 ms
4,376 KB
testcase_06 AC 231 ms
4,376 KB
testcase_07 AC 112 ms
4,380 KB
testcase_08 AC 275 ms
4,376 KB
testcase_09 AC 209 ms
4,380 KB
testcase_10 AC 297 ms
4,380 KB
testcase_11 AC 179 ms
4,380 KB
testcase_12 AC 270 ms
4,376 KB
testcase_13 AC 148 ms
4,376 KB
testcase_14 AC 3 ms
4,380 KB
testcase_15 AC 26 ms
4,376 KB
testcase_16 AC 25 ms
4,376 KB
testcase_17 AC 25 ms
4,376 KB
testcase_18 AC 25 ms
4,376 KB
testcase_19 AC 25 ms
4,380 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

const string msg[] = { "ZETUBOU", "AC" };

signed main(){
  int Q; cin >> Q;
  for( int kase = 0; kase < Q; ++kase ){
    int D, X; long long T; cin >> D >> X >> T;
    long double f = 0;
    int a = D + X - 1;
    int b = max( X, D - 1 );
    int c = min( X, D - 1 );
    for( int i = b + 1; i <= a; ++i )
      f += log10( ( long double ) i );
    for( int i = 2; i <= c; ++i )
      f -= log10( ( long double ) i );
    cout << msg[ f - 1e-16 <= log10( ( long double ) T ) ] << endl;
  }
  return 0;
}
0