結果

問題 No.542 1円玉と5円玉
ユーザー aaaaasatoriaaaaasatori
提出日時 2018-02-14 08:43:44
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 359 bytes
コンパイル時間 5,779 ms
コンパイル使用メモリ 71,256 KB
実行使用メモリ 57,520 KB
最終ジャッジ日時 2023-08-22 19:18:59
合計ジャッジ時間 8,109 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,724 KB
testcase_01 AC 118 ms
55,904 KB
testcase_02 WA -
testcase_03 AC 118 ms
55,724 KB
testcase_04 AC 117 ms
55,636 KB
testcase_05 AC 138 ms
55,480 KB
testcase_06 AC 138 ms
56,040 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 127 ms
55,612 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No542 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(); //1円玉の枚数
		int B = sc.nextInt(); //5円玉の枚数
		
		for(int i = 0;i <= B;i++) {
			for(int j = 0;j <= A;j++) {
				if(i + j != 0) {
					System.out.println(1 * j + 5 * i);
				}
			}
		}
	}
}
0