找规律20求调(其实我都不知道我写的是什么)
查看原帖
找规律20求调(其实我都不知道我写的是什么)
1581496
ethan000000000楼主2025/7/22 14:00

找规律做法

20求调

#include <bits/stdc++.h>
using namespace std;
#define int long long
int x;

signed main(){
    cin>>x;
    if (!x--) cout<<"1 1";
    cout<<floor((floor(sqrt(8*(x-1)+1))+1)/2)+1<<' '<<abs(floor((floor(sqrt(8*(x-1)+1))+1)/2)-2*(x+1-((floor((floor(sqrt(8*(x-1)+1))+1)/2)*floor((floor(sqrt(8*(x-1)+1))+1)/2)-floor((floor(sqrt(8*(x-1)+1))+1)/2))/2+2)))+1;
    return 0;
}
2025/7/22 14:00
加载中...