Advertisement
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()
- {
- int t;
- cin>>t;
- while(t--)
- {
- ll ts;
- cin>>ts;
- if(ts%2==1)cout<<ts/2<<endl;
- else
- {
- while(ts%2==0)
- {
- ts/=2;
- }
- cout<<ts/2<<endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement