結果

問題 No.250 atetubouのzetubou
ユーザー 👑 yumechiyumechi
提出日時 2016-03-11 01:14:12
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 868 bytes
コンパイル時間 2,377 ms
コンパイル使用メモリ 75,052 KB
実行使用メモリ 62,596 KB
最終ジャッジ日時 2023-10-25 04:09:42
合計ジャッジ時間 12,655 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 399 ms
62,172 KB
testcase_01 AC 267 ms
60,744 KB
testcase_02 AC 461 ms
62,496 KB
testcase_03 AC 479 ms
62,484 KB
testcase_04 AC 470 ms
62,420 KB
testcase_05 AC 472 ms
62,320 KB
testcase_06 AC 444 ms
62,320 KB
testcase_07 AC 351 ms
62,364 KB
testcase_08 AC 465 ms
62,396 KB
testcase_09 AC 414 ms
62,212 KB
testcase_10 AC 458 ms
62,372 KB
testcase_11 AC 402 ms
62,340 KB
testcase_12 AC 483 ms
62,456 KB
testcase_13 AC 384 ms
61,880 KB
testcase_14 AC 150 ms
57,760 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 133 ms
57,480 KB
testcase_21 AC 130 ms
57,204 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() {
		for(int q = sc.nextInt(); q > 0; q--) {
			int d = sc.nextInt();
			int x = sc.nextInt();
			long t = sc.nextLong();

			int n, r;
			if(d > x) {
				// x+d-1Cx
				n = (x+d-1);
				r = x;
			} else {
				// x+d-1Cd-1
				n = (x+d-1);
				r = d-1;
			}

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

			// System.out.println(q + ":" + (flag ? "AC" : "ZETUBOU"));
			System.out.println((flag ? "AC" : "ZETUBOU"));
		}
	}
}
0