結果
| 問題 |
No.415 ぴょん
|
| コンテスト | |
| ユーザー |
yn
|
| 提出日時 | 2016-08-26 23:18:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 254 bytes |
| コンパイル時間 | 297 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 88,832 KB |
| 最終ジャッジ日時 | 2024-11-08 09:50:11 |
| 合計ジャッジ時間 | 5,805 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 RE * 25 |
ソースコード
import fractions
n, d = map(int,input().split())
if n == d:
print(0)
exit()
if d > n / 2:
d = n - d
if fractions.gcd(n, d) == 1:
ans = n - 1
else:
if n % d == 0:
ans = n // d - 1
else:
ans = n // d
print(ans)
yn