結果

問題 No.250 atetubouのzetubou
ユーザー 👑 yumechiyumechi
提出日時 2016-03-11 00:57:09
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 878 bytes
コンパイル時間 2,136 ms
コンパイル使用メモリ 74,516 KB
実行使用メモリ 69,832 KB
最終ジャッジ日時 2023-10-25 04:08:12
合計ジャッジ時間 12,955 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 425 ms
65,632 KB
testcase_01 AC 274 ms
60,732 KB
testcase_02 AC 496 ms
68,208 KB
testcase_03 AC 528 ms
69,832 KB
testcase_04 AC 494 ms
65,796 KB
testcase_05 AC 509 ms
66,912 KB
testcase_06 AC 467 ms
64,700 KB
testcase_07 AC 366 ms
62,360 KB
testcase_08 AC 477 ms
66,832 KB
testcase_09 AC 435 ms
65,624 KB
testcase_10 AC 503 ms
68,536 KB
testcase_11 AC 406 ms
64,348 KB
testcase_12 AC 493 ms
63,776 KB
testcase_13 AC 394 ms
62,208 KB
testcase_14 AC 150 ms
57,776 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 132 ms
57,428 KB
testcase_21 AC 130 ms
57,452 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 = n - x;
			} else {
				// x+d-1Cd-1
				n = (x+d-1);
				r = n - (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