結果
| 問題 | No.1086 桁和の桁和2 |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2020-06-19 23:17:43 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 369 bytes |
| 記録 | |
| コンパイル時間 | 189 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 352,984 KB |
| 最終ジャッジ日時 | 2026-03-24 23:41:12 |
| 合計ジャッジ時間 | 122,999 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 TLE * 1 |
| other | AC * 1 WA * 1 TLE * 29 |
ソースコード
import sys
input = sys.stdin.readline
N=int(input())
L=list(map(int,input().split()))
R=list(map(int,input().split()))
D=list(map(int,input().split()))
D.append(0)
mod=10**9+7
ANS=1
for i in range(N):
if D[i]==D[i-1]:
ANS=ANS*(1+(pow(10,R[i])-pow(10,L[i]))//9)%mod
else:
ANS=ANS*(pow(10,R[i])-pow(10,L[i]))//9%mod
print(ANS%mod)
titia