QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#293894 | #7601. IQ Test | cghAndy | WA | 0ms | 3600kb | C++14 | 291b | 2023-12-29 22:20:48 | 2023-12-29 22:20:49 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
map<long long,bool> mp;
void dfs(long long n){
if(n<=2) return;
if(mp[n]) return;
long long x=sqrt(n);
mp[n]=1;
if(x*x<n) x++;
long long y=x*x-n;
dfs(y);
dfs(x);
}
int main(){
long long n;
cin>>n;
dfs(n);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3600kb
input:
5
output:
result:
wrong answer S must contain asked value=5