Submission #4845018


Source Code Expand

Copy
import itertools
a = [int(input()) for i in range(5)]
k = int(input())
f = True
for A, B in itertools.combinations(a, 2):
if abs(A - B) > k:
f = False
if f:
print('Yay!')
else:
print(':(')
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
import itertools
a = [int(input()) for i in range(5)]
k = int(input())

f = True
for A, B in itertools.combinations(a, 2):
    if abs(A - B) > k:
        f = False

if f:
    print('Yay!')
else:
    print(':(')

Submission Info

Submission Time
Task A - Five Antennas
User ophelia
Language Python (3.4.3)
Score 100
Code Size 222 Byte
Status AC
Exec Time 17 ms
Memory 3060 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 9
Set Name Test Cases
Sample s1.txt, s2.txt
All in1.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, s1.txt, s2.txt
Case Name Status Exec Time Memory
in1.txt AC 17 ms 2940 KB
in2.txt AC 17 ms 3060 KB
in3.txt AC 17 ms 3060 KB
in4.txt AC 17 ms 3060 KB
in5.txt AC 17 ms 3060 KB
in6.txt AC 17 ms 3060 KB
in7.txt AC 17 ms 3060 KB
s1.txt AC 17 ms 3060 KB
s2.txt AC 17 ms 3060 KB


2025-04-22 (Tue)
16:14:00 +00:00