結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-09-19 14:59:59 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 137 ms / 5,000 ms |
| コード長 | 635 bytes |
| コンパイル時間 | 3,416 ms |
| コンパイル使用メモリ | 74,664 KB |
| 実行使用メモリ | 41,432 KB |
| 最終ジャッジ日時 | 2024-10-09 10:33:49 |
| 合計ジャッジ時間 | 6,833 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
import java.util.Scanner;
/**
* アルゴリズム勉強会 第33回
* yukicoder no.207 世界のなんとか
* @author scache
*
*/
public class Main207 {
public static void main(String[] args) {
Main207 p = new Main207();
}
public Main207() {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b =sc.nextInt();
solve(a,b);
}
public void solve(int a, int b) {
for(int m=a;m<=b;m++){
if(m%3==0){
System.out.println(m);
}else{
int n = m;
for(long i=10;i<10000000000L;i*=10){
if(n%10==3){
System.out.println(m);
break;
}
n/=10;
}
}
}
}
}