0

Halloween Candy

Is ig possibl to solve it this way, without using the ceil? https://code.sololearn.com/c0wJiFkc53ae/?ref=app

1st Aug 2022, 5:25 PM
Yiğit Anıl Genç
Yiğit Anıl Genç - avatar
6 odpowiedzi
+ 1
# Hi, Yiğit Anıl Genç ! # This is one approach: ch = 2/int(input()) * 100 print(int(ch + 1 if ch > int(ch) else ch))
1st Aug 2022, 6:45 PM
Per Bratthammar
Per Bratthammar - avatar
0
Wow. Thank you sir! Hard to understand at first because of one line but yeah, that is the way i wanted to do it.
1st Aug 2022, 6:52 PM
Yiğit Anıl Genç
Yiğit Anıl Genç - avatar
0
Hi, just ask if you have any questions…
1st Aug 2022, 6:54 PM
Per Bratthammar
Per Bratthammar - avatar
0
I was trying to achieve the same by format or round, but really knowing the basics like you do is superior. I understood the int() conversion.
1st Aug 2022, 6:57 PM
Yiğit Anıl Genç
Yiğit Anıl Genç - avatar
0
Hello sir
3rd Aug 2022, 6:17 AM
MR ΠΩMI MR ΠΩMI
MR ΠΩMI MR ΠΩMI - avatar
0
How are you
3rd Aug 2022, 6:17 AM
MR ΠΩMI MR ΠΩMI
MR ΠΩMI MR ΠΩMI - avatar