結果

問題 No.250 atetubouのzetubou
ユーザー YamaKasa
提出日時 2018-09-07 15:40:51
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 734 bytes
コンパイル時間 5,074 ms
コンパイル使用メモリ 74,736 KB
実行使用メモリ 63,156 KB
最終ジャッジ日時 2024-11-27 17:47:05
合計ジャッジ時間 11,482 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int Q = scan.nextInt();
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < Q; i++) {
			long D = scan.nextLong();
			long X = scan.nextLong();
			long T = scan.nextLong();
			long k = 1;
			for(long j = 1; j < D; j++) {
				k = (k * (X + j))/ j;
				if(k > T) {
					sb.append("ZETUBOU").append("\n");
					break;
				}
			}
			if(k <= T) {
				sb.append("AC").append("\n");
			}else {
				if(D == 1) {
					if(T <= 1) {
						sb.append("AC").append("\n");
					}else {
						sb.append("ZETUBOU").append("\n");
					}
				}
			}

		}
		scan.close();
		System.out.println(sb.toString());
	}
}
0