結果
問題 |
No.542 1円玉と5円玉
|
ユーザー |
|
提出日時 | 2017-11-10 00:56:20 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 163 ms / 2,000 ms |
コード長 | 431 bytes |
コンパイル時間 | 4,493 ms |
コンパイル使用メモリ | 85,140 KB |
実行使用メモリ | 54,408 KB |
最終ジャッジ日時 | 2024-11-24 08:00:30 |
合計ジャッジ時間 | 5,337 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
package yukicoder; import java.util.*; public class P542 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); Set<Integer> s = new TreeSet<>(); for(int i=0; i<=A; i++) { for(int j=0; j<=B; j++) { if(i==0&&j==0) continue; s.add(i+5*j); } } for(int x : s) { System.out.println(x); } } }