-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathBITOBYT.cpp
More file actions
47 lines (39 loc) · 873 Bytes
/
BITOBYT.cpp
File metadata and controls
47 lines (39 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include<iostream>
#include<bits/stdc++.h>
#include<cmath>
using namespace std;
int main()
{
long long int t,n;
long long fans;
cin>>t;
while(t--)
{
cin>>n;
long long int powe=n/26;
long long int dec=n%26;
if(dec>0&&dec<=2){fans=pow(2,powe);
cout<<fans<<" ";
}
else
cout<<0<<" ";
if(dec>2&&dec<=10){
fans=pow(2,powe);
cout<<fans<<" ";
}
else
cout<<0<<" ";
if((dec>10&&dec<26)||(dec==0))
{ if(dec!=0){
fans=pow(2,powe);
cout<<fans<<" "<<endl;
}
if(dec==0){
fans=pow(2,powe-1);
cout<<fans<<" "<<endl;
}
}
else
cout<<0<<" "<<endl;
}
}