-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththerobot.cpp
More file actions
42 lines (33 loc) · 777 Bytes
/
Copy paththerobot.cpp
File metadata and controls
42 lines (33 loc) · 777 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
/*
#include <bits/stdc++.h>
using namespace std;
int main()
{
unsigned short int t=0;
cin>>t;
unsigned long long result[t][2];
for (unsigned short int i=0; i<t; i++)
{
unsigned long int n,hcf=0;
cin>>n;
unsigned long long int total = pow(2,n);
unsigned long long int collide = total - 2;
if (collide==0)
{
hcf=total;
}
else{
hcf = __gcd(total,collide);
}
total = total/hcf;
collide = collide/hcf;
result[i][0]=collide;
result[i][1]=total;
}
for (unsigned short int i=0; i<t; i++)
{
cout<<result[i][0]<<"/"<<result[i][1]<<"\n";
}
return 0;
}
*/