結果
| 問題 | No.207 世界のなんとか |
| コンテスト | |
| ユーザー |
kenji_shioya
|
| 提出日時 | 2016-06-23 01:33:20 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 5,000 ms |
| コード長 | 547 bytes |
| 記録 | |
| コンパイル時間 | 2,564 ms |
| コンパイル使用メモリ | 83,128 KB |
| 実行使用メモリ | 41,728 KB |
| 最終ジャッジ日時 | 2026-04-28 04:32:13 |
| 合計ジャッジ時間 | 6,216 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
import java.util.Scanner;
public class Exercises4{
public static void main (String[] args){
Scanner sc = new Scanner(System.in);
int firstNum = sc.nextInt();
int secondNum = sc.nextInt();
for(int n = firstNum; n <= secondNum; n++){
if (n % 3 == 0 || isThreeExist(n)){
System.out.println(n);
}
}
}
private static boolean isThreeExist(int a){
char[] array = String.valueOf(a).toCharArray();
for(char ca: array){
if(ca == '3'){
return true;
}
}
return false;
}
}
kenji_shioya