結果
問題 | No.420 mod2漸化式 |
ユーザー |
|
提出日時 | 2019-05-16 17:13:23 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 166 bytes |
コンパイル時間 | 91 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 103,648 KB |
最終ジャッジ日時 | 2024-09-17 05:34:23 |
合計ジャッジ時間 | 6,254 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 33 TLE * 1 -- * 1 |
コンパイルメッセージ
Main.rb:4: warning: assigned but unused variable - k Syntax OK
ソースコード
X = gets.to_idef comb(n,r)k=n-r if 2*r > nreturn 1 if r == 0((n-r+1)..n).reduce(&:*)/((1..r).reduce(&:*))endc = comb(31, X)p c, X * c / 31 * (2**31-1)