QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#288058 | #5817. 小学生数学题 | Koji_Tasho | 0 | 0ms | 3700kb | C++14 | 329b | 2023-12-21 17:33:04 | 2023-12-21 17:33:04 |
answer
#include<bits/stdc++.h>
using namespace std;
int n,k,ans=1;
int jc(int n){
int ret=1;
for (int i=n-1;i>=1;i--){
ret*=i;
}
return ret;
}
int main(){
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
cin>>n>>k;
if (k==1){
for (int i=n;i>1;i--){
ans+=jc(i);
}
cout<<ans<<endl;
}
return 0;
}
詳細信息
Test #1:
score: 0
Time Limit Exceeded
input:
9450395 1
output:
result:
Test #2:
score: 0
Time Limit Exceeded
input:
8978812 1
output:
result:
Test #3:
score: 0
Time Limit Exceeded
input:
8944235 1
output:
result:
Test #4:
score: 0
Wrong Answer
time: 0ms
memory: 3644kb
input:
7081118 3
output:
result:
wrong answer 1st lines differ - expected: '599009773', found: ''
Test #5:
score: 0
Wrong Answer
time: 0ms
memory: 3612kb
input:
7904241 3
output:
result:
wrong answer 1st lines differ - expected: '871243720', found: ''
Test #6:
score: 0
Wrong Answer
time: 0ms
memory: 3700kb
input:
9921275 3
output:
result:
wrong answer 1st lines differ - expected: '549818101', found: ''
Test #7:
score: 0
Wrong Answer
time: 0ms
memory: 3620kb
input:
17575748 14135489
output:
result:
wrong answer 1st lines differ - expected: '69236780', found: ''
Test #8:
score: 0
Wrong Answer
time: 0ms
memory: 3592kb
input:
19858362 14822524
output:
result:
wrong answer 1st lines differ - expected: '239890381', found: ''
Test #9:
score: 0
Wrong Answer
time: 0ms
memory: 3544kb
input:
18848696 15530895
output:
result:
wrong answer 1st lines differ - expected: '88125041', found: ''
Test #10:
score: 0
Wrong Answer
time: 0ms
memory: 3688kb
input:
17787945 13890407
output:
result:
wrong answer 1st lines differ - expected: '989967864', found: ''