QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#507112#8635. 圆LGMaster20 0ms3712kbC++14657b2024-08-06 11:04:042024-08-06 11:04:04

Judging History

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

  • [2024-08-06 11:04:04]
  • 评测
  • 测评结果:20
  • 用时:0ms
  • 内存:3712kb
  • [2024-08-06 11:04:04]
  • 提交

answer

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<climits>
//#define int long long
using namespace std;
const int N=5005,mod=998244353;
int n;
inline int read(){
    int s=0,f=1;
    char ch=getchar();
    while(!isdigit(ch)){
        if(ch=='-') f=-1;
        ch=getchar();
    }
    while(isdigit(ch)){
        s=(s<<3)+(s<<1)+(ch&15);
        ch=getchar();
    }
    return s*f;
}
int main(){
    n=read();
    if(n<=3) puts("1"),exit(0);
    else if(n<=10){
    int ans=n/3;
    if(ans*3!=n){
        ans+=1;
    }
    cout<<(1ll*ans)%998244353;
    	
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

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

input:

3

output:

1

result:

ok 1 number(s): "1"

Test #2:

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

input:

4

output:

2

result:

ok 1 number(s): "2"

Test #3:

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

input:

6

output:

2

result:

wrong answer 1st numbers differ - expected: '299473309', found: '2'

Test #4:

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

input:

10

output:

4

result:

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

Test #5:

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

input:

100

output:


result:

wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements

Test #6:

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

input:

200

output:


result:

wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements

Test #7:

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

input:

500

output:


result:

wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements

Test #8:

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

input:

4798

output:


result:

wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements

Test #9:

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

input:

4999

output:


result:

wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements

Test #10:

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

input:

5000

output:


result:

wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements