結果

問題 No.542 1円玉と5円玉
ユーザー huffman56huffman56
提出日時 2023-01-08 10:30:22
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 730 bytes
コンパイル時間 5,561 ms
コンパイル使用メモリ 105,880 KB
実行使用メモリ 24,904 KB
最終ジャッジ日時 2023-08-21 21:17:49
合計ジャッジ時間 6,567 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
22,724 KB
testcase_01 AC 65 ms
22,824 KB
testcase_02 AC 65 ms
22,820 KB
testcase_03 AC 64 ms
22,868 KB
testcase_04 AC 65 ms
22,856 KB
testcase_05 AC 66 ms
22,720 KB
testcase_06 AC 67 ms
24,812 KB
testcase_07 AC 68 ms
22,844 KB
testcase_08 AC 68 ms
22,932 KB
testcase_09 AC 68 ms
24,828 KB
testcase_10 AC 67 ms
24,904 KB
testcase_11 AC 66 ms
24,760 KB
testcase_12 AC 69 ms
22,884 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

namespace _0446
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var a = n[0];
            var b = n[1];
            var chk = new HashSet<int>();

            for (var i = 0; i <= a; i++)
            {
                for (var j = 0; j <= b; j++)
                {
                    chk.Add(i + (j * 5));
                }
            }

            var ans = chk.ToArray();
            Array.Sort(ans);

            for (var i = 1; i < ans.Length; i++)
            {
                Console.WriteLine(ans[i]);
            }

        }
    }
}
0