Skip to content

Commit

Permalink
Merge pull request #182 from Chaetenya-Sharma/master
Browse files Browse the repository at this point in the history
Add Solution for 1537
  • Loading branch information
jrijul1201 authored Oct 31, 2021
2 parents 88b2113 + 7bd6c9c commit 2f3e24f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions CodeForces/1343A.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include <bits/stdc++.h>
#include <cmath>
using namespace std;


int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;

for (int k=2;k<=log2(n+1);k++){

int y=pow(2,k)-1;
double z=n*1.0/y;
if (floor(z)==ceil(z)){

cout<<int(z)<<endl;
break;
}
}
}
return 0;
}
Empty file added CodeForces/1537.cpp
Empty file.

0 comments on commit 2f3e24f

Please sign in to comment.