結果
問題 |
No.207 世界のなんとか
|
ユーザー |
![]() |
提出日時 | 2015-12-16 17:31:23 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 713 bytes |
コンパイル時間 | 2,127 ms |
コンパイル使用メモリ | 79,316 KB |
実行使用メモリ | 37,408 KB |
最終ジャッジ日時 | 2024-09-16 05:43:25 |
合計ジャッジ時間 | 3,789 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 10 |
ソースコード
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]); } } } ++num[0]; } } catch (Exception e) { e.printStackTrace(); } } }