+ 3
Have anyone have a simple logic for "Halloween Candy" in code coach problem??
Only first two testcases passed. All the 3 are hidden. Help someone...
6 Answers
+ 1
https://code.sololearn.com/cAzRZhyJTO2w/?ref=app
Refer my code...
#include <stdio.h>
#include <math.h>
int main() {
int houses,c;
scanf("%d", &houses);
c=200/houses;
if(200%houses==0)
printf("%d",c);
else
printf("%d",c+1);
return 0;
}
+ 4
RAJESH SAHU thanks. I was trying in c. Got it from regnard.
+ 3
Let's see your code
+ 3
Got it from regnard. Thanks Regnard Viven and Justus .
+ 2
In python:
import math
houses = int(input())
print(math.ceil(2/houses*100))
+ 2
Shriaarthy E okk..âșïž