結果

問題 No.207 世界のなんとか
ユーザー 8130Tsk8130Tsk
提出日時 2015-07-22 18:00:21
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,075 bytes
コンパイル時間 3,605 ms
コンパイル使用メモリ 78,600 KB
実行使用メモリ 51,660 KB
最終ジャッジ日時 2023-09-22 21:14:11
合計ジャッジ時間 5,504 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;

public class ensyu1 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        
        System.out.println("2つの数字を小さい順に入力してください");
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        try{
            String line = reader.readLine();
            String line2= reader.readLine();
            int kazu1=Integer.parseInt(line);
            int kazu2=Integer.parseInt(line2);
            
            System.out.println("該当する数は以下のようになります。");
            for(int i=kazu1; i<kazu2; i++){
                if((i/10)==3){
                    System.out.print(i+" ");				
                }else if((i%3)==0){
                    System.out.print(i+" ");
                }
                
            }
        
        }catch(IOException e){
            System.out.println(e);
        }catch(NumberFormatException e){
            System.out.println("数字を入力してください");
        }

    }

}
0