結果
問題 | No.207 世界のなんとか |
ユーザー | n_gojo |
提出日時 | 2020-04-09 11:32:08 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 771 bytes |
コンパイル時間 | 4,112 ms |
コンパイル使用メモリ | 71,292 KB |
実行使用メモリ | 58,084 KB |
最終ジャッジ日時 | 2023-09-29 16:18:14 |
合計ジャッジ時間 | 8,188 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 122 ms
55,332 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 123 ms
55,764 KB |
testcase_07 | AC | 123 ms
55,648 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 125 ms
55,876 KB |
testcase_17 | AC | 123 ms
55,804 KB |
testcase_18 | AC | 123 ms
55,752 KB |
ソースコード
import java.util.Scanner; public class No207 { public static void main(String[] args) { // 標準入力から読み込む際に、Scannerオブジェクトを使う。 Scanner sc = new Scanner(System.in); // int 1つ分を読み込む int a = sc.nextInt(); int b = sc.nextInt(); int ans = 0; for (int i = a; i<=b; i++) { int check = i; if (check%3==0) { System.out.println(check); } else { while (check > 0) { if (check%10 == 3) { System.out.println(check); break; } check /= 10; } } } } }