結果
| 問題 | No.3708 Uncommon Time |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-11 21:21:46 |
| 言語 | C# (.NET 10.0.400 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 71 ms / 2,000 ms |
| + 904µs | |
| コード長 | 733 bytes |
| 記録 | |
| コンパイル時間 | 5,088 ms |
| コンパイル使用メモリ | 171,684 KB |
| 実行使用メモリ | 32,000 KB |
| 最終ジャッジ日時 | 2026-09-11 21:56:04 |
| 合計ジャッジ時間 | 10,163 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 55 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (170 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
#nullable enable
#region
var (_input, _iter) = (Array.Empty<string>(), 0);
T I<T>() where T : IParsable<T>
{
while (_iter >= _input.Length) (_input, _iter) = (Console.ReadLine()!.Trim().Split(' '), 0);
return T.Parse(_input[_iter++], null);
}
#endregion
long n = I<int>() * 100 + I<int>();
var ans = n.IsPrime();
Console.WriteLine(ans ? "Yes" : "No");
static class LongPrimeExtensions
{
public static List<long> Factors(this long x)
{
var res = new List<long>();
var y = x;
for (var i = 2L; i * i <= x; i++) while (y % i == 0) { res.Add(i); y /= i; }
if (y > 1) res.Add(y);
return res;
}
public static bool IsPrime(this long x) => x > 1 && x.Factors().Count == 1;
}