結果
| 問題 | No.207 世界のなんとか |
| コンテスト | |
| ユーザー |
mits58
|
| 提出日時 | 2016-05-05 14:33:56 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 5,000 ms |
| コード長 | 500 bytes |
| 記録 | |
| コンパイル時間 | 2,211 ms |
| コンパイル使用メモリ | 81,848 KB |
| 実行使用メモリ | 41,600 KB |
| 最終ジャッジ日時 | 2026-04-25 13:55:04 |
| 合計ジャッジ時間 | 3,809 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
import java.util.Scanner;
public class Main{
static boolean f(long x){
if(x%3==0) return true;
else{
String str=Long.toString(x);
for(int i=0;i<str.length();i++){
if(str.charAt(i)=='3') return true;
}
return false;
}
}
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNext()){
long a=sc.nextLong();
long b=sc.nextLong();
for(long i=a;i<=b;i++) if(f(i)) System.out.println(i);
}
}
}
mits58