結果
問題 |
No.1177 余りは?
|
ユーザー |
![]() |
提出日時 | 2020-08-21 22:34:48 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 886 bytes |
コンパイル時間 | 160 ms |
コンパイル使用メモリ | 82,588 KB |
実行使用メモリ | 134,144 KB |
最終ジャッジ日時 | 2024-10-15 06:28:48 |
合計ジャッジ時間 | 4,226 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 31 WA * 1 |
ソースコード
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()