結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
kuramu
|
| 提出日時 | 2016-01-19 16:31:15 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 5,000 ms |
| コード長 | 689 bytes |
| コンパイル時間 | 2,502 ms |
| コンパイル使用メモリ | 74,624 KB |
| 実行使用メモリ | 52,380 KB |
| 最終ジャッジ日時 | 2024-10-09 10:42:30 |
| 合計ジャッジ時間 | 3,944 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(System.out);
String[] nums = stdReader.readLine().split(" ");
int a = Integer.parseInt(nums[0]);
int b = Integer.parseInt(nums[1]);
for(int i=a;i<b+1;i++){
if(i%3==0){
out.println(i);
}else{
int num = i;
do{
if(num%10==3){
out.println(i);
break;
}
}while((num/=10)!=0);
}
}
out.flush();
}
}
kuramu