結果
| 問題 | No.542 1円玉と5円玉 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-11 16:57:13 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 68 ms / 2,000 ms |
| コード長 | 1,025 bytes |
| 記録 | |
| コンパイル時間 | 8,593 ms |
| コンパイル使用メモリ | 170,308 KB |
| 実行使用メモリ | 189,380 KB |
| 最終ジャッジ日時 | 2025-12-11 16:57:27 |
| 合計ジャッジ時間 | 10,624 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (163 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System.Numerics;
using System.Runtime.ExceptionServices;
public class Program
{
public static void Main()
{
//BigInteger num = BigInteger.Parse(Console.ReadLine() ?? string.Empty);
//int num = int.Parse(Console.ReadLine() ?? string.Empty);
string[] moji = (Console.ReadLine() ?? string.Empty).Trim().Split(' ');
//string str = Console.ReadLine() ?? string.Empty;
int a = int.Parse(moji[0]);
int b = int.Parse(moji[1]);
List<int> c = new List<int>();
for(int i = 0; i <= a;i++)
{
for(int j = 0;j <= b;j++)
{
int m = (1*i)+(5*j);
if(m == 0)
{
continue;
}
c.Add(m);
}
}
c.Sort();
Console.WriteLine(c[0]);
for(int i = 1;i < c.Count;i++)
{
if (c[i] != c[i-1])
{
Console.WriteLine(c[i]);
}
}
}
}