結果
| 問題 | No.1936 Rational Approximation |
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2022-05-14 09:50:42 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 2,000 ms |
| コード長 | 134 bytes |
| 記録 | |
| コンパイル時間 | 159 ms |
| コンパイル使用メモリ | 85,564 KB |
| 実行使用メモリ | 53,340 KB |
| 最終ジャッジ日時 | 2026-04-03 10:15:56 |
| 合計ジャッジ時間 | 1,582 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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