結果

問題 No.250 atetubouのzetubou
ユーザー kenji_shioya
提出日時 2016-06-25 06:35:39
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 642 bytes
コンパイル時間 3,414 ms
コンパイル使用メモリ 77,628 KB
実行使用メモリ 59,456 KB
最終ジャッジ日時 2024-10-11 21:28:03
合計ジャッジ時間 13,873 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 WA * 9
権限があれば一括ダウンロードができます

ソースコード

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){
        System.out.println("ZETUBOU");
      }else{
        System.out.println("AC");
      }
    }
	}
}
0