結果
問題 | No.542 1円玉と5円玉 |
ユーザー |
|
提出日時 | 2022-11-27 18:37:09 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 500 bytes |
コンパイル時間 | 14,051 ms |
コンパイル使用メモリ | 401,688 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-04 08:35:50 |
合計ジャッジ時間 | 12,080 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
use std::collections::BTreeSet; fn main() { let mut ab = String::new(); std::io::stdin().read_line(&mut ab).ok(); let ab: Vec<usize> = ab.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let a = ab[0]; let b = ab[1]; let mut result = BTreeSet::new(); for i in 0..=a { for j in 0..=b { if i == 0 && j == 0 { continue; } result.insert(i+j*5); } } for &v in result.iter() { println!("{}", v); } }