結果
| 問題 | No.443 GCD of Permutation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-26 08:46:28 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
不安定
|
| 実行時間 | 62 ms / 1,000 ms |
| + 194µs | |
| コード長 | 243 bytes |
| 記録 | |
| コンパイル時間 | 85 ms |
| コンパイル使用メモリ | 62,280 KB |
| 実行使用メモリ | 64,160 KB |
| 最終ジャッジ日時 | 2026-10-17 09:50:39 |
| 合計ジャッジ時間 | 3,919 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
ソースコード
#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))