
[백준] Fly me to the Alpha Centauri
·
PS
문제https://www.acmicpc.net/problem/1011 개념수학 실행 결과 구현 코드(c++)#include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int t; cin >> t; while (t--) { long long x, y; cin >> x >> y; double dist = y - x; // 거리 double dist_sqrt = sqrt(dist); // 거리 제곱근 int dist_round = round(dist_sqrt); // ..