結果

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

ソースコード

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;
      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