結果
| 問題 | No.443 GCD of Permutation |
| コンテスト | |
| ユーザー |
AEn
|
| 提出日時 | 2023-05-24 01:10:23 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 239 bytes |
| 記録 | |
| コンパイル時間 | 832 ms |
| コンパイル使用メモリ | 85,504 KB |
| 実行使用メモリ | 65,408 KB |
| 最終ジャッジ日時 | 2026-05-29 10:26:24 |
| 合計ジャッジ時間 | 3,414 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 RE * 10 |
ソースコード
import math
S = int(input())
s = set(list(str(S)))
if len(s)==1:
print(S)
else:
mn = 10
for a in s:
for b in s:
if a==b:continue
mn = min(mn,abs(int(a)-int(b)))
print(math.gcd(9*mn,S))
AEn