結果
| 問題 | No.443 GCD of Permutation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-26 08:46:28 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 142 ms / 1,000 ms |
| コード長 | 243 bytes |
| 記録 | |
| コンパイル時間 | 139 ms |
| コンパイル使用メモリ | 76,996 KB |
| 最終ジャッジ日時 | 2025-12-03 22:48:48 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 28 |
ソースコード
#yuki443 def gcd(a, b): while b: a, b = b, a % b return a n=raw_input() s=set() for c in n: s.add(int(c)) if len(s) == 1: print n else: res=0 for x in s: for y in s: if x > y: res = gcd(res, 9*(x-y)) print gcd(res,int(n))