結果

問題 No.250 atetubouのzetubou
ユーザー cielciel
提出日時 2015-07-24 22:46:01
言語 Ruby
(3.3.0)
結果
AC  
実行時間 115 ms / 5,000 ms
コード長 210 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 11,420 KB
実行使用メモリ 15,440 KB
最終ジャッジ日時 2023-08-27 00:01:58
合計ジャッジ時間 4,234 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
15,208 KB
testcase_01 AC 85 ms
15,228 KB
testcase_02 AC 107 ms
15,092 KB
testcase_03 AC 115 ms
15,292 KB
testcase_04 AC 108 ms
15,160 KB
testcase_05 AC 108 ms
15,364 KB
testcase_06 AC 102 ms
15,232 KB
testcase_07 AC 91 ms
15,252 KB
testcase_08 AC 106 ms
15,160 KB
testcase_09 AC 102 ms
15,440 KB
testcase_10 AC 107 ms
15,320 KB
testcase_11 AC 97 ms
15,088 KB
testcase_12 AC 107 ms
15,212 KB
testcase_13 AC 95 ms
15,216 KB
testcase_14 AC 81 ms
15,048 KB
testcase_15 AC 112 ms
15,296 KB
testcase_16 AC 107 ms
15,204 KB
testcase_17 AC 111 ms
15,232 KB
testcase_18 AC 106 ms
15,248 KB
testcase_19 AC 106 ms
15,252 KB
testcase_20 AC 79 ms
15,284 KB
testcase_21 AC 79 ms
15,088 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#!/usr/bin/ruby
gets.to_i.times{
	d,x,t=gets.split.map(&:to_i)

	n,k=[d+x-1,d-1]
	k=[k,n-k].min # if k>n/2
	r=1
	if t>0 && k.times{|i|
		r=r*(n-i)/(i+1)
		break if r>t
	}
		puts :AC
	else
		puts :ZETUBOU
	end
}
0