Skip to content

Instantly share code, notes, and snippets.

@recuraki
Created May 12, 2020 13:32
Show Gist options
  • Save recuraki/1a1803ab39543a341cbcf3cda91fc7b2 to your computer and use it in GitHub Desktop.
Save recuraki/1a1803ab39543a341cbcf3cda91fc7b2 to your computer and use it in GitHub Desktop.
/*
0(000000000): -2147483648-keta
1(000000000): 1-keta
2(000000000): 2-keta
3(000000000): 2-keta
4(000000000): 3-keta
5(000000000): 3-keta
6(000000000): 3-keta
7(000000000): 3-keta
8(000000000): 4-keta
9(000000000): 4-keta
10(000000000): 4-keta
11(000000000): 4-keta
12(000000000): 4-keta
13(000000000): 4-keta
14(000000000): 4-keta
15(000000000): 4-keta
16(000000000): 5-keta
17(000000000): 5-keta
18(000000000): 5-keta
19(000000000): 5-keta
*/
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
for(int i=0; i< 20; i++){
cout <<setw(4) << i << "(" << setw(8) << bitset<9>(s) << "): " << int((log2(i) + 1) / 1) << "-keta\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment