結果

問題 No.136 Yet Another GCD Problem
ユーザー togatogatogatoga
提出日時 2015-09-03 09:46:34
言語 Python2
(2.7.18)
結果
AC  
実行時間 74 ms / 5,000 ms
コード長 170 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 6,584 KB
実行使用メモリ 9,024 KB
最終ジャッジ日時 2023-09-26 02:32:38
合計ジャッジ時間 4,184 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
7,644 KB
testcase_01 AC 23 ms
7,740 KB
testcase_02 AC 24 ms
7,768 KB
testcase_03 AC 53 ms
8,372 KB
testcase_04 AC 71 ms
8,748 KB
testcase_05 AC 35 ms
7,984 KB
testcase_06 AC 32 ms
7,852 KB
testcase_07 AC 33 ms
8,036 KB
testcase_08 AC 48 ms
8,244 KB
testcase_09 AC 24 ms
7,792 KB
testcase_10 AC 49 ms
8,252 KB
testcase_11 AC 63 ms
8,600 KB
testcase_12 AC 23 ms
7,788 KB
testcase_13 AC 45 ms
8,388 KB
testcase_14 AC 74 ms
9,024 KB
testcase_15 AC 70 ms
8,976 KB
testcase_16 AC 64 ms
8,720 KB
testcase_17 AC 58 ms
8,688 KB
testcase_18 AC 23 ms
7,712 KB
testcase_19 AC 60 ms
8,628 KB
testcase_20 AC 49 ms
8,240 KB
testcase_21 AC 25 ms
7,804 KB
testcase_22 AC 22 ms
7,608 KB
testcase_23 AC 22 ms
7,624 KB
testcase_24 AC 23 ms
7,780 KB
testcase_25 AC 23 ms
7,792 KB
testcase_26 AC 23 ms
7,800 KB
testcase_27 AC 61 ms
8,604 KB
testcase_28 AC 49 ms
8,240 KB
testcase_29 AC 24 ms
7,644 KB
testcase_30 AC 22 ms
7,788 KB
testcase_31 AC 21 ms
7,712 KB
testcase_32 AC 22 ms
7,608 KB
testcase_33 AC 22 ms
7,772 KB
testcase_34 AC 38 ms
8,196 KB
testcase_35 AC 49 ms
8,272 KB
testcase_36 AC 31 ms
7,832 KB
testcase_37 AC 69 ms
8,732 KB
testcase_38 AC 22 ms
7,792 KB
testcase_39 AC 21 ms
7,624 KB
testcase_40 AC 22 ms
7,712 KB
testcase_41 AC 23 ms
7,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import fractions
res = 0
N,K = map(int, raw_input().split())
for i in range(1, N / 2 + 1):
    T = N - i
    G = i
    res = max(res, fractions.gcd(T, G))
print res
    
0