結果
問題 | No.933 おまわりさんこいつです |
ユーザー | watarimaycry2 |
提出日時 | 2019-12-04 00:01:44 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,107 bytes |
コンパイル時間 | 3,619 ms |
コンパイル使用メモリ | 74,672 KB |
実行使用メモリ | 56,140 KB |
最終ジャッジ日時 | 2024-05-05 23:39:50 |
合計ジャッジ時間 | 5,971 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 104 ms
40,320 KB |
testcase_01 | AC | 112 ms
40,632 KB |
testcase_02 | WA | - |
testcase_03 | AC | 100 ms
39,940 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
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 | WA | - |
testcase_17 | AC | 118 ms
41,080 KB |
testcase_18 | AC | 112 ms
40,764 KB |
testcase_19 | AC | 113 ms
41,908 KB |
testcase_20 | AC | 517 ms
48,844 KB |
testcase_21 | AC | 120 ms
40,864 KB |
testcase_22 | AC | 121 ms
41,308 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
ソースコード
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); static void myout(Object t){System.out.println(t);} static String getStr(){return sc.next();} static int getInt(){return sc.nextInt();} static Long getLong(){return sc.nextLong();} static boolean isNext(){return sc.hasNext();} public static void main(String[] args){ int N = getInt(); long[] list = new long[N]; long output = 1; for(int i = 0; i < N; i++){ long p = getLong() % 9; if(p == 0){ myout("0"); return; }else{ p = p % 9; if(p == 0){ p = 9; } } list[i] = p; } for(int i = 0; i < N; i++){ output = (output * list[i]) % 9; if(output == 0){ output = 9; } } myout(output); } //便利メソッド追加枠ここから //便利メソッド追加枠ここまで }