結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-05 21:21:04 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 134 ms / 5,000 ms |
| コード長 | 541 bytes |
| コンパイル時間 | 3,509 ms |
| コンパイル使用メモリ | 74,924 KB |
| 実行使用メモリ | 41,468 KB |
| 最終ジャッジ日時 | 2024-10-07 00:03:02 |
| 合計ジャッジ時間 | 6,430 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
import java.io.IOException;
import java.util.Scanner;
public class No00000207_Main {
public static void main(String[] args) throws IOException {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
for(int i = a; i <= b; i++) {
if(i % 3 == 0 || with3(String.valueOf(i))) {
System.out.println(i);
}
}
scan.close();
}
private static boolean with3(String str) {
for(int i = 0; i < str.length(); i++) {
if(str.charAt(i) == '3') {
return true;
}
}
return false;
}
}