QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#289053 | #5817. 小学生数学题 | allen2010y | 0 | 59ms | 3604kb | C++14 | 360b | 2023-12-23 15:01:42 | 2023-12-23 15:01:42 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int mod=998244353;
int fspow(int a,int n)
{
int ans=a;
while(n)
{
ans*=ans;
ans%=mod;
if(n&1) n--,ans*=a,ans%=mod;
n>>=1;
}
return ans;
}
int main()
{
long long n,k,ans=0,last=1;
cin>>n>>k;
for(int i=2;i<=n-1;i++)
{
ans+=i;
ans%=mod;
}
cout<<ans;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 28ms
memory: 3596kb
input:
9450395 1
output:
513460065
result:
wrong answer 1st lines differ - expected: '688545438', found: '513460065'
Test #2:
score: 0
Wrong Answer
time: 27ms
memory: 3420kb
input:
8978812 1
output:
421002125
result:
wrong answer 1st lines differ - expected: '334565356', found: '421002125'
Test #3:
score: 0
Wrong Answer
time: 27ms
memory: 3368kb
input:
8944235 1
output:
14170784
result:
wrong answer 1st lines differ - expected: '982802915', found: '14170784'
Test #4:
score: 0
Wrong Answer
time: 22ms
memory: 3304kb
input:
7081118 3
output:
205598807
result:
wrong answer 1st lines differ - expected: '599009773', found: '205598807'
Test #5:
score: 0
Wrong Answer
time: 24ms
memory: 3300kb
input:
7904241 3
output:
448402490
result:
wrong answer 1st lines differ - expected: '871243720', found: '448402490'
Test #6:
score: 0
Wrong Answer
time: 30ms
memory: 3544kb
input:
9921275 3
output:
400760568
result:
wrong answer 1st lines differ - expected: '549818101', found: '400760568'
Test #7:
score: 0
Wrong Answer
time: 53ms
memory: 3428kb
input:
17575748 14135489
output:
92573952
result:
wrong answer 1st lines differ - expected: '69236780', found: '92573952'
Test #8:
score: 0
Wrong Answer
time: 59ms
memory: 3604kb
input:
19858362 14822524
output:
43150368
result:
wrong answer 1st lines differ - expected: '239890381', found: '43150368'
Test #9:
score: 0
Wrong Answer
time: 56ms
memory: 3436kb
input:
18848696 15530895
output:
76653862
result:
wrong answer 1st lines differ - expected: '88125041', found: '76653862'
Test #10:
score: 0
Wrong Answer
time: 53ms
memory: 3304kb
input:
17787945 13890407
output:
724971040
result:
wrong answer 1st lines differ - expected: '989967864', found: '724971040'