QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#806662 | #3995. Terrible Additive Number Theory Problem | ucup-team2172# | AC ✓ | 0ms | 3672kb | C++23 | 1.3kb | 2024-12-09 13:37:59 | 2024-12-09 13:38:03 |
Judging History
answer
#include <bits/stdc++.h>
#define inf (0x7f7f7f7f)
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define Min(a, b) ((a) < (b) ? (a) : (b))
typedef long long ll;
typedef long double ld;
using namespace std;
template <class T>
inline void read(T &x){
int ch = 0, f = 0; x = 0;
for(; !isdigit(ch); ch = getchar()) if(ch == '-') f = 1;
for(; isdigit(ch); ch = getchar()) x = x * 10 + ch - 48;
if(f) x = -x;
}
const int N = 2000005;
int vis[N], prime[N], cnt;
int main(){
ll n;
read(n);
if(n >= 2431) puts("1");
else puts("0");
// n = 2000000;
// for(int i = 2; i <= n; i++){
// if(!vis[i]) prime[++cnt] = i;
// for(int j = 1; j <= cnt && 1ll * i * prime[j] <= n; j++){
// vis[i*prime[j]] = 1;
// if(i % prime[j] == 0) break;
// }
// }
// ll m = 1e18;
// vector<tuple<ll, int, int> > ans;
// for(int i = 1; i <= cnt; i++){
// __int128 cur = 1;
// for(int j = i; j < cnt; j++){
// cur = cur * prime[j];
// if(cur > m) break;
// __int128 tmp = cur + 1;
// while(tmp % 2 == 0) tmp /= 2;
// if(tmp == prime[j+1]) ans.push_back({(ll) cur, i, j});
// }
// }
// for(auto [x, l, r] : ans)
// cout << x << " " << l << " " << r << endl;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3496kb
input:
100
output:
0
result:
ok 1 number(s): "0"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
10000
output:
1
result:
ok 1 number(s): "1"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
1767
output:
0
result:
ok 1 number(s): "0"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
9876
output:
1
result:
ok 1 number(s): "1"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
1800
output:
0
result:
ok 1 number(s): "0"
Test #6:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
9540
output:
1
result:
ok 1 number(s): "1"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
1926
output:
0
result:
ok 1 number(s): "0"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
8426
output:
1
result:
ok 1 number(s): "1"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
2022
output:
0
result:
ok 1 number(s): "0"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
7826
output:
1
result:
ok 1 number(s): "1"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
1000000000000000000
output:
1
result:
ok 1 number(s): "1"
Test #12:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
284398329857324927
output:
1
result:
ok 1 number(s): "1"
Test #13:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
928473658274163764
output:
1
result:
ok 1 number(s): "1"
Test #14:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
2435
output:
1
result:
ok 1 number(s): "1"
Test #15:
score: 0
Accepted
time: 0ms
memory: 3480kb
input:
2430
output:
0
result:
ok 1 number(s): "0"
Test #16:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
2425
output:
0
result:
ok 1 number(s): "0"
Test #17:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
2431
output:
1
result:
ok 1 number(s): "1"
Test #18:
score: 0
Accepted
time: 0ms
memory: 3480kb
input:
2432
output:
1
result:
ok 1 number(s): "1"
Test #19:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
1
output:
0
result:
ok 1 number(s): "0"
Test #20:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
12349723982598
output:
1
result:
ok 1 number(s): "1"