知识点:运算
#include <iostream> #include <cmath> using namespace std; int main() { int x1 = 0; int y1 = 0; int x2 = 0; int y2 = 0; int result = 0; cin >> x1 >> y1; cin >> x2 >> y2; result = pow((x1 - x2), 2) + pow((y1 - y2), 2); cout << result; return 0; }