結果
問題 | No.542 1円玉と5円玉 |
ユーザー | curryudon08 |
提出日時 | 2020-07-07 18:52:17 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 63 ms / 2,000 ms |
コード長 | 739 bytes |
コンパイル時間 | 2,273 ms |
コンパイル使用メモリ | 104,620 KB |
実行使用メモリ | 23,880 KB |
最終ジャッジ日時 | 2023-07-24 19:46:47 |
合計ジャッジ時間 | 3,476 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 57 ms
21,840 KB |
testcase_01 | AC | 56 ms
19,644 KB |
testcase_02 | AC | 58 ms
21,744 KB |
testcase_03 | AC | 56 ms
21,768 KB |
testcase_04 | AC | 57 ms
21,788 KB |
testcase_05 | AC | 63 ms
23,676 KB |
testcase_06 | AC | 62 ms
21,740 KB |
testcase_07 | AC | 60 ms
21,796 KB |
testcase_08 | AC | 60 ms
19,788 KB |
testcase_09 | AC | 60 ms
23,880 KB |
testcase_10 | AC | 61 ms
21,824 KB |
testcase_11 | AC | 59 ms
21,848 KB |
testcase_12 | AC | 61 ms
19,676 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; using System.Collections.Generic; namespace _0542 { class Program { static void Main(string[] args) { var _ = Console.ReadLine().Split(); var a = int.Parse(_[0]); var b = int.Parse(_[1]); var s = new Dictionary<int,int>(); for(var i = 0; i <= a; i++){ for(var j = 0; j <= b; j++){ var x = j * 5 + i; if(!s.ContainsKey(x)){ s.Add(x,1); } } } foreach(var n in s.Where(t => t.Key != 0).OrderBy(t => t.Key)){ Console.WriteLine(n.Key); } } } }