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
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