JzxxOJ Problem 4209: look for the number of lightning split the solution to a problem

4209: look for the number of lightning split the solution to a problem

This is a question of OJ, the main test of a digital split, relatively simple!

topic

JzxxOJ Issue 4209

Code

#include<iostream>
#include<cstdio>
#include<iomanip>
#include<cstring>
#include<cmath>
#include<string>
#include<cstdlib>
#include<queue>
#include<map>
#include<set>
#include<ctime>
#include<algorithm>
using namespace std; 
long long l,r;
int main(){
	for(int i=1000;i<=9999;i++){
		r=i%100;
		l=(i-r)/100;
		if((l+r)*(l+r)==i) cout<<i<<endl;
	}
	return 0;
}

In fact, you can also play table, namely, direct output, here only to the data!

2025
3025
9801

Cout can also direct and easier!

Original website: JzxxOJ Problem 4209 to find the number of lightning split

Published 14 original articles · won praise 8 · views 1158

Guess you like

Origin blog.csdn.net/Horse_Lake/article/details/103963240