結果
| 問題 |
No.1936 Rational Approximation
|
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2022-05-14 09:50:42 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 134 bytes |
| コンパイル時間 | 625 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2024-07-22 17:42:10 |
| 合計ジャッジ時間 | 2,153 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 14 |
ソースコード
p, q = map(int, input().split()) yl = pow(p, -1, q) xl = p * yl // q yr = pow(-p, -1, q) xr = p * yr // q + 1 print(xl + yl + xr + yr)
Kude