結果

問題 No.250 atetubouのzetubou
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-25 05:35:10
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 623 bytes
コンパイル時間 3,700 ms
コンパイル使用メモリ 79,212 KB
実行使用メモリ 41,680 KB
最終ジャッジ日時 2024-04-20 02:32:31
合計ジャッジ時間 6,047 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 108 ms
41,252 KB
testcase_21 AC 113 ms
41,628 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();
      int t = sc.nextInt();
      int b = x + d - 1;
      long cal = 1;
      for(int j = 0; j < x; j++){
        cal *= (b - j);
        cal /= (j + 1);
        if(cal > (long)Math.pow(10, 15) && (b - j) > (j + 1)){
          break;
        }
      }
      if(cal > t){
        System.out.println("ZETUBOU");
      }else{
        System.out.println("AC");
      }
    }
	}
}
0