ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#207416 | #3740. 稳步上升 | Allen123456hello | 100 | 0ms | 1192kb | C++11 | 507b | 2024-07-28 19:19:40 | 2024-07-28 20:27:39 |
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const LL mod=100019;
LL inv(LL a){
LL ans=1,b=mod-2;
while (b){
if (b&1){(ans*=a)%=mod;}
(a*=a)%=mod;
b>>=1;
}
return ans;
}
LL C(LL n,LL m){
LL ans=1;
for (LL i=n,cnt=1;cnt<=m;--i,++cnt){ans*=(i%mod);ans%=mod;}
for (LL i=1;i<=m;++i){ans*=inv(i);ans%=mod;}
return ans;
}
int main(){
LL n;
scanf("%lld",&n);
printf("%lld",C(n+8,8));
return 0;
}
Details
小提示:点击横条可展开更详细的信息
Test #1:
score: 10
Accepted
time: 0ms
memory: 1188kb
input:
53
output:
68367
result:
ok 1 number(s): "68367"
Test #2:
score: 10
Accepted
time: 0ms
memory: 1188kb
input:
79
output:
59314
result:
ok 1 number(s): "59314"
Test #3:
score: 10
Accepted
time: 0ms
memory: 1192kb
input:
779379
output:
96028
result:
ok 1 number(s): "96028"
Test #4:
score: 10
Accepted
time: 0ms
memory: 1192kb
input:
892312
output:
48351
result:
ok 1 number(s): "48351"
Test #5:
score: 10
Accepted
time: 0ms
memory: 1192kb
input:
979379
output:
68786
result:
ok 1 number(s): "68786"
Test #6:
score: 10
Accepted
time: 0ms
memory: 1188kb
input:
999999999999997932
output:
59170
result:
ok 1 number(s): "59170"
Test #7:
score: 10
Accepted
time: 0ms
memory: 1188kb
input:
999999999999993920
output:
34158
result:
ok 1 number(s): "34158"
Test #8:
score: 10
Accepted
time: 0ms
memory: 1188kb
input:
999999999999990368
output:
92068
result:
ok 1 number(s): "92068"
Test #9:
score: 10
Accepted
time: 0ms
memory: 1188kb
input:
999999999999997872
output:
86399
result:
ok 1 number(s): "86399"
Test #10:
score: 10
Accepted
time: 0ms
memory: 1188kb
input:
999999999999995570
output:
52468
result:
ok 1 number(s): "52468"