Maximum-Cup 2013

Submission #3685652

Source codeソースコード

from collections import Counter
def factorize(n):
    d = Counter()
    m = 2
    while m*m <= n:
        while n%m == 0:
            n //= m
            d[m] += 1
        m += 1
    if n > 1:
        d[n] += 1
    return d

while 1:
    N = int(input())
    if N==0: break
    factors = factorize(N)
    print(max(factors.keys()))

Submission

Task問題 B - Working for the World
User nameユーザ名 prd_xxx
Created time投稿日時
Language言語 Python3 (3.4.3)
Status状態 AC
Score得点 100
Source lengthソースコード長 348 Byte
File nameファイル名
Exec time実行時間 29 ms
Memory usageメモリ使用量 3316 KB

Test case

Set

Set name Score得点 / Max score Cases
All 100 / 100 00-sample,10-minimum,11-maximum,12-little,13-large,14-middle,15-zero,50-random00,50-random01,50-random02,50-random03,50-random04,50-random05,50-random06,50-random07,50-random08,50-random09,50-random10,50-random11,50-random12,50-random13,50-random14,50-random15,50-random16,50-random17,50-random18,50-random19

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
00-sample AC 21 ms 3316 KB
10-minimum AC 21 ms 3316 KB
11-maximum AC 21 ms 3316 KB
12-little AC 21 ms 3316 KB
13-large AC 29 ms 3316 KB
14-middle AC 27 ms 3316 KB
15-zero AC 21 ms 3316 KB
50-random00 AC 26 ms 3316 KB
50-random01 AC 24 ms 3316 KB
50-random02 AC 28 ms 3316 KB
50-random03 AC 24 ms 3316 KB
50-random04 AC 24 ms 3316 KB
50-random05 AC 28 ms 3316 KB
50-random06 AC 28 ms 3316 KB
50-random07 AC 23 ms 3316 KB
50-random08 AC 24 ms 3316 KB
50-random09 AC 28 ms 3316 KB
50-random10 AC 23 ms 3316 KB
50-random11 AC 26 ms 3316 KB
50-random12 AC 24 ms 3316 KB
50-random13 AC 26 ms 3316 KB
50-random14 AC 26 ms 3316 KB
50-random15 AC 25 ms 3316 KB
50-random16 AC 26 ms 3316 KB
50-random17 AC 25 ms 3316 KB
50-random18 AC 28 ms 3316 KB
50-random19 AC 24 ms 3316 KB