結果

問題 No.415 ぴょん
ユーザー lllllll88938494lllllll88938494
提出日時 2023-05-26 03:16:07
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 185 bytes
コンパイル時間 610 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 71,668 KB
最終ジャッジ日時 2023-08-26 02:07:42
合計ジャッジ時間 3,878 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,200 KB
testcase_01 AC 72 ms
71,224 KB
testcase_02 AC 72 ms
71,148 KB
testcase_03 AC 72 ms
71,516 KB
testcase_04 WA -
testcase_05 AC 71 ms
71,176 KB
testcase_06 WA -
testcase_07 AC 71 ms
71,152 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 72 ms
71,244 KB
testcase_11 WA -
testcase_12 AC 72 ms
71,244 KB
testcase_13 AC 72 ms
71,296 KB
testcase_14 AC 73 ms
71,568 KB
testcase_15 AC 70 ms
71,276 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 70 ms
71,460 KB
testcase_21 WA -
testcase_22 AC 71 ms
71,400 KB
testcase_23 WA -
testcase_24 AC 71 ms
71,272 KB
testcase_25 AC 72 ms
71,572 KB
testcase_26 AC 71 ms
71,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,d = map(int,input().split())
def cal(x,y):
    if y == 0:
        return x
    return cal(y,x%y)


t=cal(n,d)

if n == d:
    print(0)
elif t == 1:
    print(n-1)
else:
    print(t-1)
0