結果

問題 No.250 atetubouのzetubou
ユーザー 👑 yumechiyumechi
提出日時 2016-03-11 01:54:12
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 869 bytes
コンパイル時間 2,223 ms
コンパイル使用メモリ 74,992 KB
実行使用メモリ 63,124 KB
最終ジャッジ日時 2023-10-25 04:10:41
合計ジャッジ時間 12,501 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 409 ms
62,224 KB
testcase_01 AC 267 ms
60,732 KB
testcase_02 AC 464 ms
62,272 KB
testcase_03 AC 483 ms
60,260 KB
testcase_04 AC 475 ms
60,140 KB
testcase_05 AC 488 ms
62,300 KB
testcase_06 AC 450 ms
62,192 KB
testcase_07 AC 359 ms
61,980 KB
testcase_08 AC 471 ms
62,372 KB
testcase_09 AC 418 ms
62,120 KB
testcase_10 AC 455 ms
62,300 KB
testcase_11 AC 406 ms
62,152 KB
testcase_12 AC 471 ms
62,224 KB
testcase_13 AC 384 ms
62,140 KB
testcase_14 AC 152 ms
57,492 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 135 ms
57,368 KB
testcase_21 AC 133 ms
57,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	
	private Scanner sc = new Scanner(System.in);
	
	public static void main(String[] args) {
		Main m = new Main();
		m.main();
	}
	
	public void main() {
		long maxnum = (long)10e15;
		for(int q = sc.nextInt(); q > 0; q--) {
			int d = sc.nextInt();
			int x = sc.nextInt();
			long t = sc.nextLong();
			
			if(d == 1) {
				System.out.println("AC");
				continue;
			}

			int n = (x+d-1);
			int r = n/2 < x ? (n - x) : x;

			// System.out.println("N:" + n + "R:" + r);
			double tn = 1;
			boolean flag = true;
			for(int i = 1; i <= r && flag; i++) {
				tn *= (n - i + 1);
				tn /= (r - i + 1);
				flag = (tn <= maxnum);
				// System.out.println("TN:" + tn);
				// System.out.println("N:" + (n - i + 1) + "R:" + (r - i + 1));
			}

			flag = (tn <= t);
			System.out.println((flag ? "AC" : "ZETUBOU"));
		}
	}
}
0