QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#526035 | #5661. Multi-Ladders | solar_express# | WA | 12ms | 10648kb | Python3 | 415b | 2024-08-21 10:01:48 | 2024-08-21 10:01:49 |
Judging History
answer
T = int(input())
mod = 1000000007
for _ in range(T):
n,k,l = map(int, input().split())
coef = ((l-2)**2+l-1) % mod
b = (l-1)**2%mod
u = (k//2)
base = u if b == 1 else (pow(b,u,mod)-1) * pow(b-1,-1,mod) % mod
print(base)
if k & 1:
base = base * (l-1) % mod
else:
base += l
base = base * l * (l-2) % mod
print(base * pow(coef, (n-1)*k, mod) % mod)
詳細信息
Test #1:
score: 0
Wrong Answer
time: 12ms
memory: 10648kb
input:
1 2 3 3
output:
1 162
result:
wrong answer 1st lines differ - expected: '162', found: '1'