結果
| 問題 | No.136 Yet Another GCD Problem |
| コンテスト | |
| ユーザー |
threepipes_s
|
| 提出日時 | 2016-01-03 20:12:35 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 125 ms / 5,000 ms |
| + 972µs | |
| コード長 | 167 bytes |
| 記録 | |
| コンパイル時間 | 279 ms |
| コンパイル使用メモリ | 21,464 KB |
| 実行使用メモリ | 15,788 KB |
| 最終ジャッジ日時 | 2026-08-31 00:32:37 |
| 合計ジャッジ時間 | 6,424 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 |
ソースコード
n, k = map(int, input().split())
def gcd(a, b):
if b==0: return a
return gcd(b, a%b)
m = 0
for i in range(1, int(n/2)+1):
m = max(m, gcd(i, n-i))
print(m)
threepipes_s