結果

問題 No.136 Yet Another GCD Problem
コンテスト
ユーザー (ΦωΦ)
提出日時 2015-04-13 23:48:51
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 78 ms / 5,000 ms
コード長 292 bytes
記録
コンパイル時間 115 ms
コンパイル使用メモリ 77,720 KB
最終ジャッジ日時 2025-12-03 14:38:51
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 39
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/python

def divisors(n):
    sq = int(n ** .5)
    res = ((i, n/i) for i in xrange(1, sq+1) if n%i==0)
    from itertools import chain
    flatten = lambda x: chain.from_iterable(x)
    return sorted(set(flatten(res)))

N, _ = map(int, raw_input().split())
print N / divisors(N)[1]
0