結果

問題 No.1177 余りは?
ユーザー uni_pythonuni_python
提出日時 2020-08-21 22:34:48
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 886 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,408 KB
実行使用メモリ 134,528 KB
最終ジャッジ日時 2024-04-23 06:40:44
合計ジャッジ時間 3,893 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
88,124 KB
testcase_01 AC 143 ms
134,528 KB
testcase_02 AC 70 ms
79,616 KB
testcase_03 AC 111 ms
111,744 KB
testcase_04 AC 80 ms
88,064 KB
testcase_05 AC 86 ms
92,048 KB
testcase_06 AC 53 ms
67,968 KB
testcase_07 AC 53 ms
67,584 KB
testcase_08 AC 126 ms
119,040 KB
testcase_09 AC 121 ms
118,144 KB
testcase_10 AC 43 ms
60,544 KB
testcase_11 AC 92 ms
96,256 KB
testcase_12 AC 53 ms
65,792 KB
testcase_13 AC 59 ms
71,424 KB
testcase_14 AC 64 ms
76,544 KB
testcase_15 AC 75 ms
84,992 KB
testcase_16 AC 68 ms
78,976 KB
testcase_17 AC 132 ms
126,080 KB
testcase_18 AC 83 ms
91,904 KB
testcase_19 AC 105 ms
105,728 KB
testcase_20 AC 58 ms
71,936 KB
testcase_21 AC 91 ms
96,128 KB
testcase_22 AC 121 ms
118,400 KB
testcase_23 AC 85 ms
91,904 KB
testcase_24 AC 68 ms
78,976 KB
testcase_25 AC 112 ms
111,616 KB
testcase_26 AC 126 ms
118,400 KB
testcase_27 AC 64 ms
71,424 KB
testcase_28 AC 97 ms
96,256 KB
testcase_29 AC 88 ms
92,032 KB
testcase_30 AC 85 ms
91,648 KB
testcase_31 AC 103 ms
105,856 KB
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    p,k=MI()
    
    def calc_se():
        import itertools
        p=7
        k=1
        ans=0
        for ite in itertools.product([0,1,2,3,4,5,6,7,8,9], repeat=p-1):
            temp=0
            for i in range(p-1):
                temp+=ite[i]*(i+1)
            if temp%p==k:
                print(ite)
                ans+=1
        print(ans)
        
        
    ans=[]
    tar=10
        
    for i in range(p-1):
        temp=tar//p
        rem=tar%p
        ans.append(temp)
        tar=rem*10
        
    ans2=0
    po=1
    for i in range(p-2,-1,-1):
        aaa=ans[i]*po
        ans2=(ans2+aaa)%mod
        po=(po*10)%mod
        
    print(ans2)
        
        
    


main()
0