結果

問題 No.415 ぴょん
コンテスト
ユーザー daleksprinter
提出日時 2018-08-12 02:52:59
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 86 ms / 1,000 ms
コード長 160 bytes
記録
コンパイル時間 230 ms
コンパイル使用メモリ 77,620 KB
最終ジャッジ日時 2025-12-04 01:18:26
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n,m = map(int,raw_input().split())

def gcd(a,b):
	if b == 0 :
		return a
	else :
		return gcd(b,a%b)

def lcm(a,b):
	return a*b/gcd(a,b)


print (n/gcd(n,m))-1
0