結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
siman
|
| 提出日時 | 2016-03-27 16:27:44 |
| 言語 | Ruby (3.4.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 484 bytes |
| コンパイル時間 | 310 ms |
| コンパイル使用メモリ | 7,296 KB |
| 実行使用メモリ | 22,784 KB |
| 最終ジャッジ日時 | 2024-10-02 04:42:01 |
| 合計ジャッジ時間 | 13,294 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | TLE * 1 -- * 19 |
コンパイルメッセージ
Syntax OK
ソースコード
class Integer
def combination(k)
self.factorial/(k.factorial*(self-k).factorial)
end
def permutation(k)
self.factorial/(self-k).factorial
end
def factorial
return 1 if self == 0
(1..self).inject(:*)
end
end
class Yukicoder
def initialize
q = gets.to_i
q.times do
d, x, t = gets.chomp.split.map(&:to_i)
if (x+d-1).combination(d-1) <= t
puts "AC"
else
puts "ZETUBOU"
end
end
end
end
Yukicoder.new
siman