結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
kenji_shioya
|
| 提出日時 | 2016-06-23 01:32:09 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 546 bytes |
| コンパイル時間 | 3,559 ms |
| コンパイル使用メモリ | 74,680 KB |
| 実行使用メモリ | 54,364 KB |
| 最終ジャッジ日時 | 2024-10-11 19:45:30 |
| 合計ジャッジ時間 | 6,947 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 10 |
ソースコード
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