結果
問題 | No.207 世界のなんとか |
ユーザー | TatsuDX |
提出日時 | 2016-09-09 00:36:30 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 385 bytes |
コンパイル時間 | 3,417 ms |
コンパイル使用メモリ | 74,532 KB |
実行使用メモリ | 56,116 KB |
最終ジャッジ日時 | 2024-04-27 18:21:33 |
合計ジャッジ時間 | 6,141 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 117 ms
53,924 KB |
testcase_01 | WA | - |
testcase_02 | AC | 137 ms
54,048 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 98 ms
52,848 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
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 | 132 ms
53,764 KB |
testcase_17 | AC | 132 ms
53,972 KB |
testcase_18 | AC | 102 ms
52,796 KB |
ソースコード
import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(), b = sc.nextInt(), t, s; for(int i = a; i <= b; i++){ s = 0; t = i; while(t > 0){ if((t%10)%3 == 0){ break; } s += t%10; t/=10; } if(t > 0 || s % 3 == 0){ System.out.println(i); } } } }