結果

問題 No.250 atetubouのzetubou
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-25 06:40:16
言語 Java21
(openjdk 21)
結果
AC  
実行時間 482 ms / 5,000 ms
コード長 653 bytes
コンパイル時間 3,008 ms
コンパイル使用メモリ 74,740 KB
実行使用メモリ 59,668 KB
最終ジャッジ日時 2024-04-20 02:35:41
合計ジャッジ時間 12,727 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 405 ms
59,456 KB
testcase_01 AC 245 ms
57,748 KB
testcase_02 AC 452 ms
59,396 KB
testcase_03 AC 482 ms
59,492 KB
testcase_04 AC 459 ms
59,320 KB
testcase_05 AC 475 ms
59,172 KB
testcase_06 AC 434 ms
59,348 KB
testcase_07 AC 326 ms
59,296 KB
testcase_08 AC 462 ms
59,332 KB
testcase_09 AC 432 ms
59,220 KB
testcase_10 AC 449 ms
59,432 KB
testcase_11 AC 368 ms
59,276 KB
testcase_12 AC 452 ms
59,216 KB
testcase_13 AC 337 ms
59,220 KB
testcase_14 AC 136 ms
54,292 KB
testcase_15 AC 458 ms
59,668 KB
testcase_16 AC 439 ms
58,584 KB
testcase_17 AC 463 ms
59,276 KB
testcase_18 AC 454 ms
59,396 KB
testcase_19 AC 447 ms
59,240 KB
testcase_20 AC 121 ms
54,252 KB
testcase_21 AC 117 ms
54,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise120{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    for(int i = 0; i < n; i++){
      int d = sc.nextInt();
      int x = sc.nextInt();
      long t = sc.nextLong();
      int b = x + d - 1;
      long cal = 1;
      int min = Math.min(x, d - 1);
      for(int j = 0; j < min; j++){
        cal *= (b - j);
        cal /= (j + 1);
        if(cal > (long)Math.pow(10, 16)){
          break;
        }
      }
      if(cal > t || cal < 1){
        System.out.println("ZETUBOU");
      }else{
        System.out.println("AC");
      }
    }
	}
}
0