結果
問題 |
No.207 世界のなんとか
|
ユーザー |
![]() |
提出日時 | 2017-10-02 21:24:30 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 142 ms / 5,000 ms |
コード長 | 407 bytes |
コンパイル時間 | 2,355 ms |
コンパイル使用メモリ | 74,200 KB |
実行使用メモリ | 44,632 KB |
最終ジャッジ日時 | 2024-11-15 22:42:09 |
合計ジャッジ時間 | 5,663 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
import java.util.Scanner; public class Main{ private static Scanner sc=new Scanner(System.in); public static void main(String args[])throws Exception{ int a=sc.nextInt(),b=sc.nextInt(); for(int i=a;i<=b;i++){ if(i%3==0 || in3(i)){ System.out.println(i); } } } private static boolean in3(int i){ String s=String.valueOf(i); if(s.indexOf("3")==-1)return false; else return true; } }