Skip to content

Commit

Permalink
1169 C
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasPLopes committed Dec 31, 2019
1 parent 35ce906 commit e11e65f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions C/1169.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define BASE 12000

typedef long long lld;

lld quantityOfGrains(int q)
{
lld result;
result = (lld) (pow(2, q)/BASE);
return result;
}

int main()
{
int times;
int houses;
scanf("%d", &times);

for (size_t i = 0; i < times; i++)
{
scanf("%d", &houses);
printf("%lld kg\n", quantityOfGrains(houses));
}

return 0;
}

0 comments on commit e11e65f

Please sign in to comment.