QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#102557 | #5661. Multi-Ladders | ir101# | WA | 2ms | 3316kb | C++17 | 575b | 2023-05-03 14:38:07 | 2023-05-03 14:38:10 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int>PII;
typedef pair<string,int>PSI;
const int N=2e5+5,INF=0x3f3f3f3f,Mod=1e9+7;
const double eps=1e-6;
typedef long long ll;
ll ksm(ll a,ll b){
ll res=1;
while(b){
if(b&1)res=(res*a)%Mod;
a=a*a%Mod;
b>>=1%Mod;
}
return res;
}
int t;
ll n,m,k;
int main(){
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
cin>>t;
while(t--){
cin>>n>>k>>m;
ll s=n*k%Mod*ksm(m,n+1)%Mod;
cout<<s<<'\n';
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 3316kb
input:
1 2 3 3
output:
162
result:
ok single line: '162'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3280kb
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 27 0 61440 84 0 412653697 272821726 135802470 999999629 294000000 999930007 589337905 314000007 999999307 490000000 490 0 49 291544900
result:
wrong answer 2nd lines differ - expected: '6', found: '27'