結果
| 問題 |
No.136 Yet Another GCD Problem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-05-21 13:30:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 53 ms / 5,000 ms |
| コード長 | 158 bytes |
| コンパイル時間 | 362 ms |
| コンパイル使用メモリ | 81,792 KB |
| 実行使用メモリ | 58,368 KB |
| 最終ジャッジ日時 | 2024-09-19 08:06:12 |
| 合計ジャッジ時間 | 3,581 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 |
ソースコード
# Python3勉強中
import math
n,k = list(map(int,input().split()))
r = 0
for x in range(1,int(n/2)+1):
y = n - x
r = max(r,math.gcd(x,y))
print(r)