結果
問題 | No.2562 数字探しゲーム(緑以下コンver.) |
ユーザー |
|
提出日時 | 2023-12-02 16:38:16 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 862 bytes |
コンパイル時間 | 217 ms |
コンパイル使用メモリ | 82,828 KB |
実行使用メモリ | 81,992 KB |
最終ジャッジ日時 | 2024-11-19 21:34:03 |
合計ジャッジ時間 | 2,484 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 WA * 1 |
ソースコード
from collections import defaultdict, deque, Counterimport copyfrom itertools import combinations, permutations, product, accumulate, groupby, chainfrom heapq import heapify, heappop, heappushimport mathimport bisectfrom pprint import pprintfrom random import randintimport sys# sys.setrecursionlimit(700000)input = lambda: sys.stdin.readline().rstrip('\n')inf = float('inf')mod1 = 10**9+7mod2 = 998244353def ceil_div(x, y): return -(-x//y)################################################T = int(input())for _ in range(T):M = int(input())D = list(map(int, input().split()))s = 0ans = 0cnt = 0for i, d in enumerate(D, 1):for j in range(d):s = (s*10 + i) % Mans = ans*10 + icnt += 1s = s * 10**(18-cnt) % Mans *= 10**(18-cnt)ans += (-s)%Mprint(ans)