Submission #62024442


Source Code Expand

Copy
N = int(input())
A = list(map(int,input().split()))
st = A[0]
hi = A[1]/A[0]
ans = 'Yes'
for i in range(1,N):
if A[i] != st*hi:
ans = 'No'
st *= hi
print(ans)
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
N = int(input())
A = list(map(int,input().split()))
st = A[0]

hi = A[1]/A[0]
ans = 'Yes'
for i in range(1,N):
  if A[i] != st*hi:
    ans = 'No'
  st *= hi

print(ans)

Submission Info

Submission Time
Task B - Geometric Sequence
User sA_3
Language Python (PyPy 3.10-v7.3.12)
Score 200
Code Size 179 Byte
Status AC
Exec Time 57 ms
Memory 76740 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 30
Set Name Test Cases
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, hand_08.txt, hand_09.txt, hand_10.txt, hand_11.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt
Case Name Status Exec Time Memory
example_00.txt AC 55 ms 76304 KB
example_01.txt AC 55 ms 76408 KB
example_02.txt AC 55 ms 76464 KB
hand_00.txt AC 56 ms 76200 KB
hand_01.txt AC 55 ms 76568 KB
hand_02.txt AC 55 ms 76680 KB
hand_03.txt AC 56 ms 76564 KB
hand_04.txt AC 55 ms 76672 KB
hand_05.txt AC 55 ms 76580 KB
hand_06.txt AC 56 ms 76476 KB
hand_07.txt AC 57 ms 76208 KB
hand_08.txt AC 56 ms 76580 KB
hand_09.txt AC 57 ms 76568 KB
hand_10.txt AC 56 ms 76740 KB
hand_11.txt AC 56 ms 76648 KB
random_00.txt AC 55 ms 76312 KB
random_01.txt AC 56 ms 76552 KB
random_02.txt AC 55 ms 76272 KB
random_03.txt AC 56 ms 76464 KB
random_04.txt AC 55 ms 76280 KB
random_05.txt AC 56 ms 76408 KB
random_06.txt AC 56 ms 76420 KB
random_07.txt AC 55 ms 76344 KB
random_08.txt AC 55 ms 76284 KB
random_09.txt AC 55 ms 76428 KB
random_10.txt AC 55 ms 76544 KB
random_11.txt AC 56 ms 76340 KB
random_12.txt AC 56 ms 76596 KB
random_13.txt AC 55 ms 76540 KB
random_14.txt AC 56 ms 76512 KB


2025-03-29 (Sat)
05:05:05 +00:00