結果
| 問題 |
No.854 公平なりんご分配
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2019-07-26 21:48:04 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 395 bytes |
| コンパイル時間 | 78 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 45,836 KB |
| 最終ジャッジ日時 | 2024-07-02 06:57:38 |
| 合計ジャッジ時間 | 14,157 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | WA * 20 RE * 72 |
ソースコード
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
Query=[list(map(int,input().split())) for i in range(Q)]
import math
from itertools import accumulate
B=[math.log(a) for a in A]
S=[0]+list(accumulate(B))
for p,l,r in Query:
#print(S[r]-S[l-1],round(pow(math.e,S[r]-S[l-1])))
if round(pow(math.e,S[r]-S[l-1]))%p==0:
print("Yes")
else:
print("No")
titia