結果

問題 No.542 1円玉と5円玉
ユーザー shinwisteriashinwisteria
提出日時 2018-03-13 19:32:47
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 453 bytes
コンパイル時間 3,208 ms
コンパイル使用メモリ 71,560 KB
実行使用メモリ 65,260 KB
最終ジャッジ日時 2023-08-14 16:37:00
合計ジャッジ時間 7,377 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,664 KB
testcase_01 AC 124 ms
55,724 KB
testcase_02 AC 125 ms
55,780 KB
testcase_03 AC 123 ms
55,316 KB
testcase_04 WA -
testcase_05 AC 144 ms
55,884 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 129 ms
55,600 KB
testcase_11 AC 131 ms
55,444 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con542 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int a = s.nextInt() , b = s.nextInt() , max = a + b * 5;
		s.close();

		if(a < 4){
			for(int i = 0;i <= b;i++){
				for(int j = 0;j <= a;j++){
					if(i + j != 0){
						System.out.println(i*5 + j);
					}
				}
			}
		}else{
			for(int i = 1;i <= max * b;i++){
				System.out.println(i);
			}
		}
	}

}
0