結果
問題 | No.9005 実行時間/使用メモリテスト(テスト用) |
ユーザー | はむ吉🐹 |
提出日時 | 2016-08-24 11:48:51 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 615 ms / 3,000 ms |
コード長 | 613 bytes |
コンパイル時間 | 7,572 ms |
コンパイル使用メモリ | 186,388 KB |
実行使用メモリ | 69,028 KB |
最終ジャッジ日時 | 2024-04-25 14:52:53 |
合計ジャッジ時間 | 11,980 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 611 ms
68,772 KB |
testcase_01 | AC | 615 ms
69,028 KB |
testcase_02 | AC | 605 ms
66,904 KB |
testcase_03 | AC | 605 ms
68,892 KB |
testcase_04 | AC | 609 ms
68,896 KB |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (273 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/
ソースコード
open System.Collections.Generic // open System.Diagnostics let sieveOfEratosthenes n = let isPrime = Array.create n true let primes = new List<int>() Array.set isPrime 0 false Array.set isPrime 1 false for i = 2 to n - 1 do if isPrime.[i] then primes.Add(i) for j in 2 * i .. i .. n - 1 do Array.set isPrime j false primes let () = let n = 5000000 // let stopwatch = Stopwatch.StartNew() let primes = sieveOfEratosthenes n // stopwatch.Stop() // printfn "%.3f ms" stopwatch.Elapsed.TotalMilliseconds printfn "%d" 0