Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define fast()(ios_base::sync_with_stdio(0),cin.tie(NULL));
- int main()
- {
- fast();
- ll t;
- cin>>t;
- while(t--)
- {
- ll n;
- cin>>n;
- ll sum=1,i=1,x;
- while(sum<=n)
- {
- if(n%sum==0)
- {
- x=n/sum;
- // cout<<"X "<<x<<" "<<sum<<endl;
- }
- i*=2;
- sum+=i;
- }
- cout<<x<<endl;
- }
- }
RAW Paste Data