結果

問題 No.542 1円玉と5円玉
ユーザー Mcpu3Mcpu3
提出日時 2018-06-22 01:30:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 165 ms / 2,000 ms
コード長 344 bytes
コンパイル時間 3,270 ms
コンパイル使用メモリ 72,016 KB
実行使用メモリ 56,464 KB
最終ジャッジ日時 2023-09-13 07:48:19
合計ジャッジ時間 4,732 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
55,572 KB
testcase_01 AC 128 ms
55,988 KB
testcase_02 AC 128 ms
55,964 KB
testcase_03 AC 125 ms
56,128 KB
testcase_04 AC 125 ms
55,480 KB
testcase_05 AC 143 ms
56,376 KB
testcase_06 AC 144 ms
55,660 KB
testcase_07 AC 154 ms
55,908 KB
testcase_08 AC 154 ms
55,676 KB
testcase_09 AC 157 ms
56,076 KB
testcase_10 AC 128 ms
56,020 KB
testcase_11 AC 131 ms
55,768 KB
testcase_12 AC 165 ms
56,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no542{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a,b,i,j,t=0;
		a=stdIn.nextInt();
		b=stdIn.nextInt();
		for(i=0;i<=b;i++) {
			for(j=0;j<=a;j++) {
				if(!(i==0&&j==0||t>=5*i+j)) {
					System.out.println(5*i+j);
					t=5*i+j;
				}
			}
		}
	}
}
0