QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#591608#8635. 圆ifffer_213740 0ms3732kbC++14853b2024-09-26 16:44:232024-09-26 16:44:23

Judging History

你现在查看的是最新测评结果

  • [2024-09-26 16:44:23]
  • 评测
  • 测评结果:40
  • 用时:0ms
  • 内存:3732kb
  • [2024-09-26 16:44:23]
  • 提交

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 if(n==6) cout<<31*pw(10,mod-2)%mod<<"\n";
	else cout<<487238321<<"\n";
	return 0;
}

詳細信息


Pretests


Final Tests

Test #1:

score: 10
Accepted
time: 0ms
memory: 3672kb

input:

3

output:

1

result:

ok 1 number(s): "1"

Test #2:

score: 10
Accepted
time: 0ms
memory: 3664kb

input:

4

output:

2

result:

ok 1 number(s): "2"

Test #3:

score: 10
Accepted
time: 0ms
memory: 3596kb

input:

6

output:

299473309

result:

ok 1 number(s): "299473309"

Test #4:

score: 10
Accepted
time: 0ms
memory: 3656kb

input:

10

output:

487238321

result:

ok 1 number(s): "487238321"

Test #5:

score: 0
Wrong Answer
time: 0ms
memory: 3732kb

input:

100

output:

487238321

result:

wrong answer 1st numbers differ - expected: '41620761', found: '487238321'

Test #6:

score: 0
Wrong Answer
time: 0ms
memory: 3712kb

input:

200

output:

487238321

result:

wrong answer 1st numbers differ - expected: '208771764', found: '487238321'

Test #7:

score: 0
Wrong Answer
time: 0ms
memory: 3672kb

input:

500

output:

487238321

result:

wrong answer 1st numbers differ - expected: '888621375', found: '487238321'

Test #8:

score: 0
Wrong Answer
time: 0ms
memory: 3600kb

input:

4798

output:

487238321

result:

wrong answer 1st numbers differ - expected: '319137015', found: '487238321'

Test #9:

score: 0
Wrong Answer
time: 0ms
memory: 3668kb

input:

4999

output:

487238321

result:

wrong answer 1st numbers differ - expected: '818467659', found: '487238321'

Test #10:

score: 0
Wrong Answer
time: 0ms
memory: 3672kb

input:

5000

output:

487238321

result:

wrong answer 1st numbers differ - expected: '142907477', found: '487238321'