結果
| 問題 | No.810 割った余りの個数 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-04 13:59:14 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 784 bytes |
| 記録 | |
| コンパイル時間 | 7,328 ms |
| コンパイル使用メモリ | 171,232 KB |
| 実行使用メモリ | 41,892 KB |
| 最終ジャッジ日時 | 2025-12-04 13:59:27 |
| 合計ジャッジ時間 | 12,716 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 3 TLE * 1 -- * 9 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (95 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System.Numerics;
public class Program
{
public static void Main()
{
//int num = int.Parse(Console.ReadLine() ?? string.Empty);
string[] str = (Console.ReadLine() ?? string.Empty).Trim().Split(' ');
//string str = Console.ReadLine() ?? string.Empty;
long l = long.Parse(str[0]);
long r = long.Parse(str[1]);
long m = long.Parse(str[2]);
List<long> list = new List<long>();
for (int i = (int)l; i <= r; i++)
{
if(i % m == 0)
{
continue;
}
long a = i % m;
bool d = list.Contains(a);
if (!d)
{
list.Add(a);
}
}
Console.WriteLine(list.Count+1);
}
}