結果
| 問題 | No.420 mod2漸化式 |
| コンテスト | |
| ユーザー |
kuuso1
|
| 提出日時 | 2016-09-09 22:59:51 |
| 言語 | F# (F# 10.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 578 bytes |
| 記録 | |
| コンパイル時間 | 5,296 ms |
| コンパイル使用メモリ | 212,652 KB |
| 実行使用メモリ | 43,904 KB |
| 最終ジャッジ日時 | 2026-05-11 17:19:55 |
| 合計ジャッジ時間 | 8,526 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | TLE * 1 -- * 34 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (173 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
open System
let ri () = stdin.ReadLine() |> int
let ria () = stdin.ReadLine().Split() |> Array.map int
type Sol() =
member this.Solve() =
let x = ri ()
let rec nCr n r :int64=
match (n,r) with
| (_,0) -> 1L
| (n,r) when r > n -> 0L
| (_,_) ->( nCr (n-1) (r-1) ) + ( nCr (n-1) r)
let nc =(if x > 31 then 0L else nCr 31 x )
let nn =(if x > 31 then 0L else nCr 30 (x-1) )
printfn "%d %d" nc (2147483647L * nn)
let mySol = new Sol()
mySol.Solve()
kuuso1