結果

問題 No.1632 Sorting Integers (GCD of M)
ユーザー 👑 KazunKazun
提出日時 2021-08-09 03:50:25
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 474 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 81,688 KB
実行使用メモリ 65,896 KB
最終ジャッジ日時 2023-10-20 04:31:29
合計ジャッジ時間 4,639 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,476 KB
testcase_01 RE -
testcase_02 AC 39 ms
53,476 KB
testcase_03 AC 40 ms
53,476 KB
testcase_04 AC 39 ms
53,476 KB
testcase_05 RE -
testcase_06 AC 39 ms
53,476 KB
testcase_07 WA -
testcase_08 RE -
testcase_09 WA -
testcase_10 RE -
testcase_11 AC 40 ms
53,476 KB
testcase_12 AC 40 ms
53,476 KB
testcase_13 RE -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 39 ms
53,476 KB
testcase_17 RE -
testcase_18 AC 40 ms
53,476 KB
testcase_19 WA -
testcase_20 AC 39 ms
53,476 KB
testcase_21 WA -
testcase_22 AC 38 ms
53,476 KB
testcase_23 AC 38 ms
53,476 KB
testcase_24 AC 39 ms
53,476 KB
testcase_25 AC 39 ms
53,476 KB
testcase_26 WA -
testcase_27 AC 39 ms
53,476 KB
testcase_28 AC 39 ms
53,476 KB
testcase_29 AC 39 ms
53,476 KB
testcase_30 AC 39 ms
53,476 KB
testcase_31 AC 38 ms
53,476 KB
testcase_32 AC 39 ms
53,476 KB
testcase_33 RE -
testcase_34 WA -
testcase_35 AC 39 ms
53,476 KB
testcase_36 AC 39 ms
53,476 KB
testcase_37 WA -
testcase_38 AC 39 ms
53,476 KB
testcase_39 AC 39 ms
53,476 KB
testcase_40 AC 39 ms
53,476 KB
testcase_41 AC 40 ms
53,476 KB
testcase_42 RE -
testcase_43 WA -
testcase_44 AC 39 ms
53,476 KB
testcase_45 AC 39 ms
53,476 KB
testcase_46 WA -
testcase_47 AC 40 ms
53,476 KB
testcase_48 AC 39 ms
53,476 KB
testcase_49 AC 39 ms
53,476 KB
testcase_50 RE -
testcase_51 RE -
testcase_52 RE -
testcase_53 AC 39 ms
53,476 KB
testcase_54 AC 39 ms
53,476 KB
testcase_55 AC 40 ms
53,476 KB
testcase_56 AC 39 ms
53,476 KB
testcase_57 AC 39 ms
53,476 KB
testcase_58 AC 39 ms
53,476 KB
testcase_59 AC 39 ms
53,476 KB
testcase_60 AC 39 ms
53,476 KB
testcase_61 AC 40 ms
53,476 KB
testcase_62 AC 40 ms
53,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
C=["*"]+list(map(int,input().split()))
Mod=10**9+7

#コーナーケース処理
F=0; I=0
for i in range(1,10):
    if C[i]:
        F+=1
        I=i

if F==1:
    X=I*(pow(10,N,Mod)-1)*pow(9,Mod-2,Mod)
    X%=Mod
    exit(print(X))

M=1
#2の倍数?
if C[1]==C[3]==C[5]==C[7]==C[9]==0:
    M*=2

    if C[2]==C[6]==0:
        M*=2

#3の倍数?
T=0
for i in range(1,10):
    T+=i*C[i]

if T%9==0:
    M*=9
elif T%3==0:
    M*=3

if M==1:
    y=1/0

print(M)
0