結果
問題 | No.2593 Reorder and Mod 120 |
ユーザー | Kude |
提出日時 | 2023-12-21 06:59:00 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 301 bytes |
コンパイル時間 | 329 ms |
コンパイル使用メモリ | 81,700 KB |
実行使用メモリ | 76,168 KB |
最終ジャッジ日時 | 2023-12-21 06:59:04 |
合計ジャッジ時間 | 3,360 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 48 ms
64,452 KB |
testcase_01 | AC | 35 ms
53,460 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 51 ms
64,452 KB |
testcase_06 | WA | - |
testcase_07 | AC | 42 ms
53,460 KB |
testcase_08 | AC | 40 ms
53,460 KB |
testcase_09 | AC | 35 ms
53,460 KB |
testcase_10 | AC | 35 ms
53,460 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | AC | 51 ms
64,964 KB |
testcase_25 | AC | 51 ms
64,964 KB |
testcase_26 | AC | 51 ms
64,964 KB |
ソースコード
n = int(input()) d = [0] * 10 for c in input(): d[ord(c)-48] += 1 t = min(n, 3) ans = [False] * 8 for x in range(10 ** (t - 1), 10 ** t): for c in map(int, str(x)): d[c] -= 1 if min(d) >= 0: ans[x % 8] = True for c in map(int, str(x)): d[c] += 1 print(sum(ans))