結果

問題 No.250 atetubouのzetubou
ユーザー kenji_shioya
提出日時 2016-06-25 05:58:05
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 546 bytes
コンパイル時間 3,816 ms
コンパイル使用メモリ 76,940 KB
実行使用メモリ 52,944 KB
最終ジャッジ日時 2024-10-11 21:25:44
合計ジャッジ時間 16,370 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

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