花 题解
__biu_biu_biu__ · · 题解
题目中说
根据
然后你发现由于
考虑构造
故答案为求最大的整数
注意到
:::info[代码]
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int T;
cin >> T;
while (T--) {
unsigned long long x;
cin >> x;
unsigned long long n = x * 2, k = 1;
while (n % k == 0) ++k;
cout << k - 1 << '\n';
}
return 0;
}
:::