[백준 1011번] Fly me to the Alpha Centauri (C++)
문제링크 : https://www.acmicpc.net/problem/1011#include using namespace std;typedef long long ll;int T;int main(void){ ios_base::sync_with_stdio(false); cin.tie(0); cin >> T; while(T--) { ll x, y; cin >> x >> y; ll gap = y-x; double n = sqrt(gap); int n2 = round(sqrt(gap)); if(n 먼저 거리에 따른 규칙을 찾아봐야 한다.거리 형태 횟수1 1 12 11 23 111..
백준/골드
2025. 3. 24. 05:45