Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
N = int(input())                                                                                                                                             
CN = 6                                                                                                                                                       
                                                                                                                                                             
TC = [0] * (CN-1)                                                                                                                                            
for i in range(CN-1):                                                                                                                                        
    TC[i] = int(input())                                                                                                                                     
                                                                                                                                                             
                                                                                                                                                             
time = CN - 1                                                                                                                                                
                                                                                                                                                             
min_TC = N                                                                                                                                                   
for i in range(CN-1):                                                                                                                                        
    if TC[i] < min_TC:                                                                                                                                       
        time = time + min_TC//TC[i]                                                                                                                          
        min_TC = TC[i]                                                                                                                                       
                                                                                                                                                             
print(time)

N = int(input())                                                                                                                                             
CN = 6                                                                                                                                                       
                                                                                                                                                             
TC = [0] * (CN-1)                                                                                                                                            
for i in range(CN-1):                                                                                                                                        
    TC[i] = int(input())                                                                                                                                     
                                                                                                                                                             
                                                                                                                                                             
time = CN - 1                                                                                                                                                
                                                                                                                                                             
min_TC = N                                                                                                                                                   
for i in range(CN-1):                                                                                                                                        
    if TC[i] < min_TC:                                                                                                                                       
        min_TC = TC[i]                                                                                                                                       
        time = time + min_TC//TC[i]                                                                                                                          
                                                                                                                                                             
print(time)                                                                                                                                                  
                                                                                                                                                             
            

#!/usr/bin/env python3
import sys


def solve(a: int, b: int, c: int, d: int, e: int, k: int):
    if (e-a) > k:
        print(":(")
    else:
        print("Yay!")


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    c = int(next(tokens))  # type: int
    d = int(next(tokens))  # type: int
    e = int(next(tokens))  # type: int
    k = int(next(tokens))  # type: int
    solve(a, b, c, d, e, k)

if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Wrong Answer

Accepted