結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
t8m8⛄️
|
| 提出日時 | 2015-08-15 15:47:59 |
| 言語 | Java (openjdk 23) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,156 bytes |
| コンパイル時間 | 5,381 ms |
| コンパイル使用メモリ | 80,412 KB |
| 実行使用メモリ | 63,556 KB |
| 最終ジャッジ日時 | 2024-07-18 09:40:25 |
| 合計ジャッジ時間 | 9,620 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | RE * 20 |
ソースコード
import java.util.*;
import java.io.*;
import java.awt.geom.*;
import java.math.*;
public class No0250 {
static final Scanner in = new Scanner(System.in);
static final PrintWriter out = new PrintWriter(System.out,false);
static void solve() {
BigInteger[] fact = createFactorialArray(0,3000);
int q = in.nextInt();
while (q-- > 0) {
int d = in.nextInt();
int x = in.nextInt();
int t = in.nextInt();
out.println(fact[d+x-1].divide(fact[d-1]).divide(fact[x]).compareTo(BigInteger.valueOf(t)) <= 0 ? "AC" : "ZETUBOU");
}
}
public static BigInteger[] createFactorialArray(int offset, int n) {
if (offset >= n || n <= 0) return null;
BigInteger[] ret = new BigInteger[n];
ret[0] = ret[1] = BigInteger.ONE;
for (int i=2; i<n; i++) ret[i] = ret[i-1].multiply(BigInteger.valueOf(i));
return Arrays.copyOfRange(ret,offset,n);
}
public static void main(String[] args) {
long start = System.currentTimeMillis();
solve();
out.flush();
long end = System.currentTimeMillis();
//trace(end-start + "ms");
in.close();
out.close();
}
static void trace(Object... o) { System.out.println(Arrays.deepToString(o));}
}
t8m8⛄️