結果
問題 | No.407 鴨等素数間隔列の数え上げ |
ユーザー | kuuso1 |
提出日時 | 2016-08-23 23:09:48 |
言語 | F# (F# 4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 820 bytes |
コンパイル時間 | 6,870 ms |
コンパイル使用メモリ | 201,044 KB |
実行使用メモリ | 190,872 KB |
最終ジャッジ日時 | 2024-04-25 12:11:35 |
合計ジャッジ時間 | 26,669 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 339 ms
34,916 KB |
testcase_01 | AC | 341 ms
34,780 KB |
testcase_02 | AC | 340 ms
34,056 KB |
testcase_03 | AC | 395 ms
59,148 KB |
testcase_04 | AC | 341 ms
34,904 KB |
testcase_05 | TLE | - |
testcase_06 | AC | 633 ms
82,804 KB |
testcase_07 | AC | 339 ms
34,648 KB |
testcase_08 | AC | 340 ms
34,652 KB |
testcase_09 | AC | 341 ms
34,784 KB |
testcase_10 | AC | 341 ms
34,652 KB |
testcase_11 | AC | 339 ms
34,656 KB |
testcase_12 | AC | 345 ms
37,216 KB |
testcase_13 | AC | 342 ms
34,920 KB |
testcase_14 | AC | 347 ms
36,324 KB |
testcase_15 | AC | 336 ms
34,540 KB |
testcase_16 | AC | 342 ms
34,096 KB |
testcase_17 | AC | 341 ms
34,816 KB |
testcase_18 | AC | 344 ms
34,060 KB |
testcase_19 | AC | 393 ms
59,252 KB |
testcase_20 | AC | 527 ms
81,816 KB |
testcase_21 | AC | 410 ms
61,172 KB |
testcase_22 | AC | 398 ms
58,556 KB |
testcase_23 | AC | 452 ms
67,768 KB |
testcase_24 | AC | 528 ms
81,712 KB |
testcase_25 | AC | 638 ms
82,812 KB |
testcase_26 | AC | 632 ms
82,812 KB |
testcase_27 | AC | 383 ms
57,616 KB |
testcase_28 | AC | 461 ms
67,880 KB |
testcase_29 | AC | 618 ms
82,740 KB |
testcase_30 | AC | 388 ms
58,896 KB |
testcase_31 | AC | 584 ms
82,320 KB |
testcase_32 | AC | 622 ms
82,768 KB |
testcase_33 | TLE | - |
testcase_34 | TLE | - |
testcase_35 | TLE | - |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (234 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) /home/judge/data/code/Main.fs(4,13): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '[|_; _; _|]' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj] main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
open System type Sol() = member this.Solve() = let [|N;L|] = stdin.ReadLine().Split() |> Array.map int let NL = int64 N let LL = int64 L let isPrime = Array.create (L/2 + 100) true let mutable primes:int list = [] isPrime.[0] <- false isPrime.[1] <- false let ul1 = L/2 |> double |> sqrt |> int |> (+) 1 for i = 2 to ul1 do if isPrime.[i] = true then for j in [(i*i)..i..(L/2 + 99)] do isPrime.[j] <- false let mutable ans:int64 = 0L for i = 2 to (L/2 + 1) do if isPrime.[i] = true && LL >= ((NL-1L) * (int64 i)) then ans <- ans + (int64 (( L - ((N-1) * i) + 1 ))) printfn "%d" ans let mySol = new Sol() mySol.Solve()