QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#293894#7601. IQ TestcghAndyWA 0ms3600kbC++14291b2023-12-29 22:20:482023-12-29 22:20:49

Judging History

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

  • [2023-12-29 22:20:49]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3600kb
  • [2023-12-29 22:20:48]
  • 提交

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