結果

問題 No.250 atetubouのzetubou
ユーザー t8m8⛄️t8m8⛄️
提出日時 2015-08-15 15:47:59
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 1,156 bytes
コンパイル時間 3,857 ms
コンパイル使用メモリ 77,248 KB
実行使用メモリ 63,532 KB
最終ジャッジ日時 2023-09-25 12:04:22
合計ジャッジ時間 8,558 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 155 ms
63,064 KB
testcase_21 AC 162 ms
63,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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));}
}
0