結果

問題 No.542 1円玉と5円玉
ユーザー fal_rndfal_rnd
提出日時 2017-08-25 23:12:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 654 bytes
コンパイル時間 2,708 ms
コンパイル使用メモリ 93,496 KB
実行使用メモリ 41,688 KB
最終ジャッジ日時 2024-04-23 15:43:42
合計ジャッジ時間 4,255 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
41,104 KB
testcase_01 AC 101 ms
41,424 KB
testcase_02 AC 110 ms
41,340 KB
testcase_03 AC 114 ms
41,248 KB
testcase_04 AC 112 ms
41,488 KB
testcase_05 AC 129 ms
41,320 KB
testcase_06 AC 113 ms
40,500 KB
testcase_07 AC 118 ms
41,688 KB
testcase_08 AC 118 ms
40,500 KB
testcase_09 AC 134 ms
40,444 KB
testcase_10 AC 105 ms
41,424 KB
testcase_11 AC 115 ms
41,280 KB
testcase_12 AC 159 ms
41,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.HashSet;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main{
	static IntStream REPS(int v){return IntStream.range(0,v);}
	static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
	static IntStream INS(int n) {return REPS(n).map(i->getInt());}
	static Scanner s=new Scanner(System.in);
	static int getInt(){return Integer.parseInt(s.next());}

	public static void main(String[]$){
		int one=getInt(),five=getInt();
		HashSet<Integer>r=new HashSet<>();
		for(int i=0;i<=five;++i)
			for(int j=0;j<=one;++j)
				r.add(i*5+j);
		r.remove(0);
		r.stream().sorted().forEach(System.out::println);
	}
}
0