結果
問題 | No.443 GCD of Permutation |
ユーザー | vockyX |
提出日時 | 2016-11-11 23:30:04 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 254 bytes |
コンパイル時間 | 246 ms |
コンパイル使用メモリ | 10,580 KB |
実行使用メモリ | 12,776 KB |
最終ジャッジ日時 | 2023-08-16 19:43:46 |
合計ジャッジ時間 | 3,311 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
12,620 KB |
testcase_01 | AC | 15 ms
8,216 KB |
testcase_02 | AC | 15 ms
8,212 KB |
testcase_03 | AC | 17 ms
8,024 KB |
testcase_04 | AC | 16 ms
8,180 KB |
testcase_05 | AC | 15 ms
8,068 KB |
testcase_06 | AC | 16 ms
8,232 KB |
testcase_07 | AC | 16 ms
8,188 KB |
testcase_08 | AC | 16 ms
8,088 KB |
testcase_09 | AC | 16 ms
8,108 KB |
testcase_10 | AC | 15 ms
8,128 KB |
testcase_11 | AC | 16 ms
8,196 KB |
testcase_12 | AC | 16 ms
8,020 KB |
testcase_13 | AC | 16 ms
8,172 KB |
testcase_14 | RE | - |
testcase_15 | TLE | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
ソースコード
import itertools def gcd(a,b): if b==0: return a else: return gcd(b,a%b) string = input() A=[i for i in string] res=int(string) for i in itertools.permutations(A): res=gcd(res,(int("".join(i)))) if res==1:break print(res)