結果
問題 | No.250 atetubouのzetubou |
ユーザー | t8m8⛄️ |
提出日時 | 2015-08-15 15:50:51 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 3,415 ms / 5,000 ms |
コード長 | 1,158 bytes |
コンパイル時間 | 6,007 ms |
コンパイル使用メモリ | 77,392 KB |
実行使用メモリ | 118,552 KB |
最終ジャッジ日時 | 2023-09-25 12:06:31 |
合計ジャッジ時間 | 44,781 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2,222 ms
98,456 KB |
testcase_01 | AC | 702 ms
64,232 KB |
testcase_02 | AC | 3,212 ms
117,428 KB |
testcase_03 | AC | 3,415 ms
118,552 KB |
testcase_04 | AC | 2,541 ms
112,288 KB |
testcase_05 | AC | 2,730 ms
114,048 KB |
testcase_06 | AC | 2,273 ms
99,952 KB |
testcase_07 | AC | 1,428 ms
70,844 KB |
testcase_08 | AC | 2,950 ms
115,788 KB |
testcase_09 | AC | 2,095 ms
85,952 KB |
testcase_10 | AC | 3,207 ms
118,012 KB |
testcase_11 | AC | 2,092 ms
87,076 KB |
testcase_12 | AC | 2,601 ms
105,024 KB |
testcase_13 | AC | 1,730 ms
79,308 KB |
testcase_14 | AC | 270 ms
63,464 KB |
testcase_15 | AC | 571 ms
65,952 KB |
testcase_16 | AC | 594 ms
66,168 KB |
testcase_17 | AC | 557 ms
66,252 KB |
testcase_18 | AC | 554 ms
66,176 KB |
testcase_19 | AC | 564 ms
66,532 KB |
testcase_20 | AC | 157 ms
63,220 KB |
testcase_21 | AC | 160 ms
61,516 KB |
ソースコード
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,3001); int q = in.nextInt(); while (q-- > 0) { int d = in.nextInt(); int x = in.nextInt(); long t = in.nextLong(); 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));} }