Submission #4292284


Source Code Expand

Copy
import fractions
from functools import reduce

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

N = int(input())
A = list(map(int, input().split()))

print(gcd_list(A))

Submission Info

Submission Time
Task C - Monsters Battle Royale
User showyou41
Language Python3 (3.4.3)
Score 300
Code Size 194 Byte
Status
Exec Time 85 ms
Memory 16276 KB

Test Cases

Set Name Score / Max Score Test Cases
All 300 / 300 0_random_1, 0_random_2, 0_random_3, 0_random_4, 1_normal_1, 1_normal_2, 1_normal_3, 1_normal_4, 1_normal_5, 1_normal_6, 2_corner_1, 2_corner_2, 2_corner_3, 2_corner_4, 2_corner_5, 2_corner_6, 2_corner_7, 2_corner_8, sample_01, sample_02, sample_03
Sample 0 / 0 sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
0_random_1 65 ms 11728 KB
0_random_2 83 ms 16276 KB
0_random_3 36 ms 5048 KB
0_random_4 37 ms 5048 KB
1_normal_1 46 ms 7312 KB
1_normal_2 68 ms 12716 KB
1_normal_3 83 ms 16276 KB
1_normal_4 85 ms 16276 KB
1_normal_5 36 ms 5048 KB
1_normal_6 39 ms 5048 KB
2_corner_1 81 ms 15248 KB
2_corner_2 79 ms 16108 KB
2_corner_3 36 ms 5048 KB
2_corner_4 79 ms 16068 KB
2_corner_5 79 ms 16120 KB
2_corner_6 49 ms 7888 KB
2_corner_7 51 ms 7068 KB
2_corner_8 58 ms 8440 KB
sample_01 36 ms 5048 KB
sample_02 36 ms 5048 KB
sample_03 36 ms 5048 KB