Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SuprDewd/CompetitiveProgramming
/ cdiv
Function
cdiv
code/mathematics/intx.test.gen.py:20–21 ·
view source on GitHub ↗
(x, y)
Source
from the content-addressed store, hash-verified
18
return
res
19
20
def
cdiv(x, y):
21
return
abs(x) / abs(y) * cmp(x, _sage_const_0 ) * cmp(y, _sage_const_0 )
22
23
def
cmod(x, y):
24
return
abs(x) % abs(y) * (_sage_const_1
if
x > _sage_const_0
else
-_sage_const_1 )
Callers
nothing calls this directly
Calls
1
cmp
Class · 0.50
Tested by
no test coverage detected