QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#526035#5661. Multi-Ladderssolar_express#WA 12ms10648kbPython3415b2024-08-21 10:01:482024-08-21 10:01:49

Judging History

你现在查看的是最新测评结果

  • [2024-08-21 10:01:49]
  • 评测
  • 测评结果:WA
  • 用时:12ms
  • 内存:10648kb
  • [2024-08-21 10:01:48]
  • 提交

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'