結果
| 問題 |
No.2774 Wake up Record 2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-16 08:18:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 460 bytes |
| コンパイル時間 | 199 ms |
| コンパイル使用メモリ | 82,124 KB |
| 実行使用メモリ | 67,016 KB |
| 最終ジャッジ日時 | 2024-12-24 17:46:40 |
| 合計ジャッジ時間 | 2,805 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 16 |
ソースコード
m=[int(input("指数"))]
n=[int(input("底"))]
p=998244353
i=0
o=[1]
s=0
if n[0]%p==0:
print(0)
elif n[0]==1:
print(1)
else:
while m[i]>1:
if (m[i])%2==0:
m.append(int(m[i]/2))
n.append(int((n[i]*n[i])%p))
else:
m.append(int((m[i]-1)/2))
n.append(int(n[i]*n[i])%p)
o.append(n[i])
if n[i+1]==1:
print(1)
m[i+1]=1
s=1
i += 1
o.pop(0)
if s==0:
a=n[i]
for t in range(0,len(o)):
a=a*o[t]
a=a%p
print(a)