結果
| 問題 |
No.3361 2解間格子点
|
| コンテスト | |
| ユーザー |
ゼット
|
| 提出日時 | 2025-11-14 22:20:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 274 bytes |
| コンパイル時間 | 426 ms |
| コンパイル使用メモリ | 82,288 KB |
| 実行使用メモリ | 54,020 KB |
| 最終ジャッジ日時 | 2025-11-14 22:20:42 |
| 合計ジャッジ時間 | 5,107 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 61 WA * 4 |
ソースコード
A,B,C=map(int,input().split()) from math import isqrt K=isqrt(B**2-4*A*C) if A>0: l=(-B-K)//(2*A) r=(-B+K)//(2*A) else: l=(B-K)//(2*abs(A)) r=(B+K)//(2*abs(A)) if B**2-4*A*C==K**2 and (-B-K)%(2*A)==0: r-=1 if B**2-4*A*C!=K**2 and (-B-K)%(2*A)==0: l-=1 print(r-l)
ゼット