QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#626793#5661. Multi-LaddersKowerKoint#WA 10ms10716kbPython3271b2024-10-10 13:05:422024-10-10 13:05:42

Judging History

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

  • [2024-10-10 13:05:42]
  • 评测
  • 测评结果:WA
  • 用时:10ms
  • 内存:10716kb
  • [2024-10-10 13:05:42]
  • 提交

answer

T=int(input())
for t in range(T):
    N,K,C=map(int,input().split())
    mod=10**9+7
    ans=-C*(C-1)*(C-2)-(1-C)**3*(1-pow(1-C,K-3,mod))%mod
    if K%2:
        ans=-ans
        ans%=mod
    ans*=pow((C-1)*(C-1)-(C-2),3*(N-1),mod)
    ans%=mod
    print(ans)

詳細信息

Test #1:

score: 100
Accepted
time: 10ms
memory: 10716kb

input:

1
2 3 3

output:

162

result:

ok single line: '162'

Test #2:

score: -100
Wrong Answer
time: 7ms
memory: 10604kb

input:

20
2 3 3
1 3 3
10 3 0
10 3 2
1 21 2
1 22 0
2000 15000 2000
12000 30000 200000
1000000000 3 3
2 1000000000 3
2 3 100000000
1000000000 1000000000 10
1000000000 3 100000000
2 1000000000 100000000
1 1000000000 10
1 1000000000 100000000
1 1000 100000000
1000000000 1000000000 0
1000000000 1000000000 1
100...

output:

162
6
0
0
0
0
295863886
332523859
52489881
796875060
176686901
139537944
558243892
29310428
693053429
883715672
80402569
0
0
294935167

result:

wrong answer 7th lines differ - expected: '349400141', found: '295863886'