結果
問題 | No.542 1円玉と5円玉 |
ユーザー | te-sh |
提出日時 | 2017-07-14 22:23:27 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 665 bytes |
コンパイル時間 | 898 ms |
コンパイル使用メモリ | 125,564 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 20:55:53 |
合計ジャッジ時間 | 1,961 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string;import std.container; // SList, DList, BinaryHeapimport std.typecons; // Tuple, Nullable, BigFlagsimport std.math; // math functionsimport std.numeric; // gcd, fftimport std.bigint; // BigIntimport std.random; // randomimport std.bitmanip; // BitArrayimport core.bitop; // bit operationimport std.regex; // RegEximport std.uni; // unicodevoid main(){auto rd = readln.split.to!(int[]), a = rd[0], b = rd[1];int[] r;foreach (i; 0..a+1)foreach (j; 0..b+1)r ~= i + j * 5;r = r.sort().uniq.array;foreach (ri; r[1..$])writeln(ri);}