結果
| 問題 | No.443 GCD of Permutation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-26 08:46:28 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
|
| 実行時間 | 54 ms / 1,000 ms |
| + 385µs | |
| コード長 | 243 bytes |
| 記録 | |
| コンパイル時間 | 57 ms |
| コンパイル使用メモリ | 80,876 KB |
| 実行使用メモリ | 82,872 KB |
| 最終ジャッジ日時 | 2026-07-18 11:14:56 |
| 合計ジャッジ時間 | 3,505 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))