結果
問題 |
No.443 GCD of Permutation
|
ユーザー |
![]() |
提出日時 | 2016-11-11 23:55:30 |
言語 | Python2 (2.7.18) |
結果 |
MLE
|
実行時間 | - |
コード長 | 209 bytes |
コンパイル時間 | 726 ms |
コンパイル使用メモリ | 6,820 KB |
実行使用メモリ | 829,440 KB |
最終ジャッジ日時 | 2024-11-25 10:24:50 |
合計ジャッジ時間 | 42,467 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | MLE * 4 |
other | AC * 3 TLE * 11 MLE * 14 |
ソースコード
from fractions import gcd from itertools import permutations st=raw_input() lst=[] for l in list(permutations(st,len(st))): lst.append(reduce(lambda x,y: x+y,l).lstrip("0")) print reduce(gcd, map(int,lst))