結果
問題 |
No.207 世界のなんとか
|
ユーザー |
![]() |
提出日時 | 2015-12-16 17:33:58 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 60 ms / 5,000 ms |
コード長 | 728 bytes |
コンパイル時間 | 2,227 ms |
コンパイル使用メモリ | 75,852 KB |
実行使用メモリ | 37,524 KB |
最終ジャッジ日時 | 2024-10-09 10:39:44 |
合計ジャッジ時間 | 4,114 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader read = new BufferedReader(new InputStreamReader(System.in)); try { String[] box = read.readLine().split(" "); long[] num = new long[2]; for (int i = 0; i < 2; ++i) { num[i] = Long.parseLong(box[i]); } while (num[0] <= num[1]) { String ch = num[0] + ""; if (num[0] % 3 == 0) { System.out.println(num[0]); } else { for (int i = 0; i < ch.length(); ++i) { if (ch.charAt(i) == '3') { System.out.println(num[0]); break; } } } ++num[0]; } } catch (Exception e) { e.printStackTrace(); } } }