結果
| 問題 |
No.542 1円玉と5円玉
|
| コンテスト | |
| ユーザー |
yuya178
|
| 提出日時 | 2017-07-14 22:28:08 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 158 ms / 2,000 ms |
| コード長 | 480 bytes |
| コンパイル時間 | 2,389 ms |
| コンパイル使用メモリ | 74,484 KB |
| 実行使用メモリ | 41,916 KB |
| 最終ジャッジ日時 | 2024-10-07 23:07:04 |
| 合計ジャッジ時間 | 4,789 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
boolean S[] = new boolean[100000];
S[0] = true;
int res = 0;
for(int i=0; i<=B; i++){
for(int j=0; j<=A; j++){
res = 5*i+1*j;
if(S[res]==false) System.out.println(res);
S[res]=true;
}
}
}
}
yuya178