結果

問題 No.250 atetubouのzetubou
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-25 06:40:16
言語 Java19
(openjdk 21)
結果
AC  
実行時間 475 ms / 5,000 ms
コード長 653 bytes
コンパイル時間 3,479 ms
コンパイル使用メモリ 72,104 KB
実行使用メモリ 62,368 KB
最終ジャッジ日時 2023-08-02 02:10:37
合計ジャッジ時間 13,361 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 392 ms
61,140 KB
testcase_01 AC 254 ms
59,356 KB
testcase_02 AC 442 ms
61,072 KB
testcase_03 AC 456 ms
60,624 KB
testcase_04 AC 456 ms
60,772 KB
testcase_05 AC 456 ms
60,964 KB
testcase_06 AC 422 ms
61,004 KB
testcase_07 AC 335 ms
60,864 KB
testcase_08 AC 459 ms
61,400 KB
testcase_09 AC 414 ms
61,452 KB
testcase_10 AC 441 ms
60,692 KB
testcase_11 AC 376 ms
60,516 KB
testcase_12 AC 440 ms
60,976 KB
testcase_13 AC 367 ms
60,500 KB
testcase_14 AC 142 ms
55,680 KB
testcase_15 AC 469 ms
62,368 KB
testcase_16 AC 475 ms
61,500 KB
testcase_17 AC 452 ms
60,548 KB
testcase_18 AC 441 ms
60,476 KB
testcase_19 AC 444 ms
60,216 KB
testcase_20 AC 122 ms
55,752 KB
testcase_21 AC 122 ms
55,832 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