結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
ユーザー 👑 timitimi
提出日時 2023-12-02 16:52:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 174 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 77,512 KB
最終ジャッジ日時 2023-12-02 16:52:44
合計ジャッジ時間 2,191 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
53,332 KB
testcase_01 AC 33 ms
53,332 KB
testcase_02 AC 33 ms
53,332 KB
testcase_03 AC 33 ms
53,332 KB
testcase_04 AC 133 ms
76,388 KB
testcase_05 AC 170 ms
77,512 KB
testcase_06 AC 119 ms
76,276 KB
testcase_07 AC 125 ms
76,268 KB
testcase_08 AC 153 ms
76,792 KB
testcase_09 AC 174 ms
77,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
for _ in range(N):
  M=int(input())
  A=list(map(int, input().split()))
  B=[]
  for i in range(9):
    for j in range(A[i]):
      B.append(str(i+1))
  if len(B)==0:
    print(M)
  else:
    c=int(''.join(B))*10**9
    d=c%M 
    if d!=0:
      c+=M-d
    print(c)
0