結果

問題 No.207 世界のなんとか
ユーザー Ryota EnokidoRyota Enokido
提出日時 2018-12-09 21:36:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 547 bytes
コンパイル時間 2,051 ms
コンパイル使用メモリ 71,756 KB
実行使用メモリ 57,916 KB
最終ジャッジ日時 2023-10-14 21:54:49
合計ジャッジ時間 5,339 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,700 KB
testcase_01 AC 120 ms
55,744 KB
testcase_02 AC 126 ms
55,840 KB
testcase_03 AC 121 ms
55,740 KB
testcase_04 AC 120 ms
55,680 KB
testcase_05 AC 124 ms
56,616 KB
testcase_06 AC 118 ms
56,192 KB
testcase_07 AC 118 ms
55,772 KB
testcase_08 AC 118 ms
55,920 KB
testcase_09 AC 123 ms
56,236 KB
testcase_10 AC 124 ms
55,952 KB
testcase_11 AC 122 ms
56,164 KB
testcase_12 AC 123 ms
55,696 KB
testcase_13 AC 123 ms
55,976 KB
testcase_14 AC 124 ms
57,916 KB
testcase_15 AC 120 ms
55,744 KB
testcase_16 AC 119 ms
56,160 KB
testcase_17 AC 120 ms
55,896 KB
testcase_18 AC 120 ms
56,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
 
 public class Main {
     public static void main(String[] args) {
         Scanner sc = new Scanner(System.in);
         
         long A = sc.nextLong();
         long B = sc.nextLong();
         
         
         while(A<=B){
             if(A%3==0){
                 System.out.println(A);
             }else{
                 String s = String.valueOf(A);
                 if(s.contains("3")){
                     System.out.println(A);
                 }
             }
             A++;
         }
 
     }
 }
0