結果
| 問題 | No.9005 実行時間/使用メモリテスト(テスト用) |
| ユーザー |
はむ吉🐹
|
| 提出日時 | 2016-08-24 14:43:37 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 60 ms / 3,000 ms |
| コード長 | 875 bytes |
| 記録 | |
| コンパイル時間 | 1,019 ms |
| コンパイル使用メモリ | 105,600 KB |
| 実行使用メモリ | 26,624 KB |
| 最終ジャッジ日時 | 2026-05-08 09:12:32 |
| 合計ジャッジ時間 | 3,944 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
namespace EratosthenesCS
{
class Program
{
readonly static int N = 5000000;
static List<int> SieveOfEratosthenes(int n)
{
bool[] isPrime = Enumerable.Repeat(true, n).ToArray();
var primes = new List<int>();
isPrime[0] = isPrime[1] = false;
for (int i = 2; i < n; i++)
{
if (isPrime[i])
{
primes.Add(i);
for (int j = 2 * i; j < n; j += i)
{
isPrime[j] = false;
}
}
}
return primes;
}
static void Main(string[] args)
{
var _ = SieveOfEratosthenes(N);
Console.WriteLine(0);
}
}
}
はむ吉🐹