Submission #30032885


Source Code Expand

V,A,B,C = map(int, input().split())

res = V
for i in range(10**5 + 10):
  if(i%3 == 0):
    res -= A
    if(res < 0):
      ans = 'F'
      break
  
  elif(i%3 == 1): 
    res -= B
    if(res < 0):
      ans = 'M'
      break
  
  elif(i%3 == 2): 
    res -= C
    if(res < 0):
      ans = 'T'
      break   
      
print(ans)      
      

Submission Info

Submission Time
Task A - Shampoo
User hiro22
Language Python (3.8.2)
Score 100
Code Size 363 Byte
Status AC
Exec Time 41 ms
Memory 9060 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 11
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 17 ms 8836 KiB
random_02.txt AC 19 ms 9052 KiB
random_03.txt AC 17 ms 8832 KiB
random_04.txt AC 19 ms 8836 KiB
random_05.txt AC 18 ms 8948 KiB
random_06.txt AC 21 ms 9060 KiB
random_07.txt AC 17 ms 8936 KiB
random_08.txt AC 18 ms 8840 KiB
sample_01.txt AC 19 ms 8836 KiB
sample_02.txt AC 18 ms 8980 KiB
sample_03.txt AC 41 ms 8936 KiB