結果
問題 |
No.3245 Payment with 8-rep Currency
|
ユーザー |
![]() |
提出日時 | 2025-08-22 22:35:41 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 636 bytes |
コンパイル時間 | 411 ms |
コンパイル使用メモリ | 82,236 KB |
実行使用メモリ | 77,992 KB |
最終ジャッジ日時 | 2025-08-22 22:36:43 |
合計ジャッジ時間 | 12,486 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 30 |
ソースコード
seen = [None] * (1000 * 11 + 1000 * 1) for i in range(1, 100): for j in range(1, 100): if max(i, j) >= 2 * min(i, j): continue seen[i * 1 + j * 11] = (i, j) # for v in range(1111 + 1): # if not seen[v]: # print(v) for _ in range(int(input())): n = int(input()) if n % 8: print(-1) continue n //= 8 if n <= 1000 and not seen[n]: print(-1) continue # n - 111x <= 1000 # 111x >= n - 1000 x = (n - 1000 + 110) // 111 ans = list(seen[n - 111 * x]) ans[0] += seen[111][0] * x ans[1] += seen[111][1] * x print(*ans, 0, 0)