結果

問題 No.420 mod2漸化式
ユーザー kuuso1kuuso1
提出日時 2016-09-09 23:08:34
言語 F#
(F# 4.0)
結果
RE  
実行時間 -
コード長 692 bytes
コンパイル時間 7,444 ms
コンパイル使用メモリ 189,248 KB
実行使用メモリ 35,692 KB
最終ジャッジ日時 2024-04-28 02:35:13
合計ジャッジ時間 19,600 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 316 ms
34,564 KB
testcase_01 AC 308 ms
34,576 KB
testcase_02 AC 308 ms
34,608 KB
testcase_03 AC 305 ms
34,848 KB
testcase_04 AC 301 ms
34,724 KB
testcase_05 AC 310 ms
34,568 KB
testcase_06 RE -
testcase_07 AC 325 ms
34,316 KB
testcase_08 AC 316 ms
34,052 KB
testcase_09 AC 314 ms
34,480 KB
testcase_10 AC 303 ms
34,572 KB
testcase_11 AC 298 ms
34,596 KB
testcase_12 AC 308 ms
34,608 KB
testcase_13 AC 302 ms
34,736 KB
testcase_14 AC 305 ms
34,704 KB
testcase_15 AC 308 ms
34,700 KB
testcase_16 AC 308 ms
34,608 KB
testcase_17 AC 307 ms
34,604 KB
testcase_18 AC 306 ms
34,572 KB
testcase_19 AC 310 ms
34,864 KB
testcase_20 AC 299 ms
33,928 KB
testcase_21 AC 304 ms
34,720 KB
testcase_22 AC 312 ms
34,724 KB
testcase_23 AC 304 ms
34,348 KB
testcase_24 AC 310 ms
34,612 KB
testcase_25 AC 295 ms
34,732 KB
testcase_26 AC 301 ms
34,444 KB
testcase_27 AC 294 ms
34,568 KB
testcase_28 AC 308 ms
34,348 KB
testcase_29 AC 298 ms
34,732 KB
testcase_30 AC 295 ms
34,360 KB
testcase_31 AC 295 ms
34,588 KB
testcase_32 AC 306 ms
34,592 KB
testcase_33 AC 303 ms
34,604 KB
testcase_34 AC 300 ms
34,736 KB
testcase_35 AC 299 ms
34,484 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (202 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

open System

let ri () = stdin.ReadLine() |> int
let ria () = stdin.ReadLine().Split() |> Array.map int

type Sol() =
    member this.Solve() = 
        let x = ri ()
        
        let nCr = Array.zeroCreate<int64 []> 32
        for i in 0..31 do
            nCr.[i] <- Array.zeroCreate<int64> 32
            nCr.[i].[0] <- 1L
        for i in 1..31 do 
            for j in 1..i do
                nCr.[i].[j] <- nCr.[i-1].[j-1] + nCr.[i-1].[j]
        
        
        
        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()
0