結果
| 問題 | No.420 mod2漸化式 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-05-16 17:13:23 |
| 言語 | Ruby (4.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 166 bytes |
| 記録 | |
| コンパイル時間 | 67 ms |
| コンパイル使用メモリ | 8,960 KB |
| 実行使用メモリ | 91,816 KB |
| 最終ジャッジ日時 | 2026-04-06 03:18:14 |
| 合計ジャッジ時間 | 5,062 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 33 TLE * 1 -- * 1 |
コンパイルメッセージ
Main.rb:4: warning: assigned but unused variable - k Syntax OK
ソースコード
X = gets.to_i def comb(n,r) k=n-r if 2*r > n return 1 if r == 0 ((n-r+1)..n).reduce(&:*)/((1..r).reduce(&:*)) end c = comb(31, X) p c, X * c / 31 * (2**31-1)