-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathChef_and_Dice.cpp
More file actions
52 lines (52 loc) · 1 KB
/
Copy pathChef_and_Dice.cpp
File metadata and controls
52 lines (52 loc) · 1 KB
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
48
49
50
51
52
#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main(){
ll t;
cin>>t;
while(t--)
{
ll n;
cin>>n;
ll total =0;
total = (n/4)*44;
ll top = (n%4);
if(n>=4)
{
if(top == 0)
{
total += 16;
}
if(top == 1)
{
total +=32;
}
if(top == 2)
{
total += 44;
}
if(top == 3)
{
total += 55;
}
cout<<total<<endl;
}
else{
int hunger = 0;
if(top == 1)
{
hunger += 20;
}
if(top == 2)
{
hunger += 36;
}
if(top == 3)
{
hunger +=51;
}
cout<<hunger<<endl;
}
}
return 0;
}