原题:1335
题意:给出N, 求A, B, C,N^2 ≤ A, B, C ≤ (N+1)^2, 使得(A^2 + B^2)可以被C整除
解法:如下…自己体会
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << n*n+n << " " << n*n+2*n << " " << n*n << endl;
}
原题:1335
题意:给出N, 求A, B, C,N^2 ≤ A, B, C ≤ (N+1)^2, 使得(A^2 + B^2)可以被C整除
解法:如下…自己体会
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << n*n+n << " " << n*n+2*n << " " << n*n << endl;
}