結果
問題 | No.207 世界のなんとか |
ユーザー |
![]() |
提出日時 | 2015-05-31 14:23:14 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 139 ms / 5,000 ms |
コード長 | 436 bytes |
コンパイル時間 | 3,380 ms |
コンパイル使用メモリ | 74,352 KB |
実行使用メモリ | 41,844 KB |
最終ジャッジ日時 | 2024-10-09 10:21:11 |
合計ジャッジ時間 | 6,678 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
package b2015_5_31; import java.util.Scanner; public class SekaiNantoka { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); for(int i=a; i<=b; i++){ if(match(i)){ System.out.println(i); } } } private static boolean match(int i){ if(i%3==0){ return true; } while(i>0){ if(i%10==3){ return true; }else{ i /= 10; } } return false; } }