QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#591601 | #8635. 圆 | ifffer_2137 | 30 | 0ms | 3736kb | C++14 | 814b | 2024-09-26 16:43:14 | 2024-09-26 16:43:16 |
Judging History
answer
//From: ifffer_2137
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf 0x7fffffff
#define eb emplace_back
#define pii pair<int,int>
#define mkpr make_pair
#define fir first
#define sec second
inline int read(){
char ch=getchar();int x=0,w=1;
while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
while(ch>='0'&&ch<='9')x=(x<<1)+(x<<3)+ch-48,ch=getchar();return w==1?x:-x;
}
const int mod=998244353;
int pw(int a,int x){
int s=1;
while(x){
if(x&1) s=s*a%mod;
a=a*a%mod;x>>=1;
}
return s;
}
int n;
signed main(){
#ifndef ONLINE_JUDGE
freopen("data.in","r",stdin);
freopen("test.out","w",stdout);
#endif
cin.tie(0),cout.tie(0);
n=read();
if(n==3) puts("1");
else if(n==4) puts("2");
else cout<<31*pw(10,mod-2)%mod<<"\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Pretests
Final Tests
Test #1:
score: 10
Accepted
time: 0ms
memory: 3720kb
input:
3
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: 10
Accepted
time: 0ms
memory: 3652kb
input:
4
output:
2
result:
ok 1 number(s): "2"
Test #3:
score: 10
Accepted
time: 0ms
memory: 3652kb
input:
6
output:
299473309
result:
ok 1 number(s): "299473309"
Test #4:
score: 0
Wrong Answer
time: 0ms
memory: 3672kb
input:
10
output:
299473309
result:
wrong answer 1st numbers differ - expected: '487238321', found: '299473309'
Test #5:
score: 0
Wrong Answer
time: 0ms
memory: 3604kb
input:
100
output:
299473309
result:
wrong answer 1st numbers differ - expected: '41620761', found: '299473309'
Test #6:
score: 0
Wrong Answer
time: 0ms
memory: 3736kb
input:
200
output:
299473309
result:
wrong answer 1st numbers differ - expected: '208771764', found: '299473309'
Test #7:
score: 0
Wrong Answer
time: 0ms
memory: 3660kb
input:
500
output:
299473309
result:
wrong answer 1st numbers differ - expected: '888621375', found: '299473309'
Test #8:
score: 0
Wrong Answer
time: 0ms
memory: 3712kb
input:
4798
output:
299473309
result:
wrong answer 1st numbers differ - expected: '319137015', found: '299473309'
Test #9:
score: 0
Wrong Answer
time: 0ms
memory: 3660kb
input:
4999
output:
299473309
result:
wrong answer 1st numbers differ - expected: '818467659', found: '299473309'
Test #10:
score: 0
Wrong Answer
time: 0ms
memory: 3672kb
input:
5000
output:
299473309
result:
wrong answer 1st numbers differ - expected: '142907477', found: '299473309'