結果
問題 | No.136 Yet Another GCD Problem |
ユーザー |
![]() |
提出日時 | 2015-04-13 23:48:51 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 11 ms / 5,000 ms |
コード長 | 292 bytes |
コンパイル時間 | 45 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,656 KB |
最終ジャッジ日時 | 2024-07-04 14:19:06 |
合計ジャッジ時間 | 1,645 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 39 |
ソースコード
#!/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]