[New-bugs-announce] [issue39086] Division "/" error on Long Integers

Mradul Tiwari report at bugs.python.org
Wed Dec 18 06:57:14 EST 2019

New submission from Mradul Tiwari <mradul at mnnit.ac.in>:

I'm a Competitive programmer and got Wrong Answer because of this division issue, which I figured out post Contest. Please See the attached screenshot.

The "/" operator gives float division but for long integers, it's giving integer answer. I've tested it on several values but the result doesn't matched with expected answers. I've also googled a lot about this but can't get the explanation.

Please go to link "https://codeforces.com/contest/1266/submission/67106918"
and see the actual arise of problem on SEVERAL VALUES, in detail section, in TestCase 3 which have very large integers.

In my code at that link, the error arises inside the function get(x) at line "c=(x-i)/14"

assignee: docs at python
components: Documentation
files: Tested values.png
messages: 358622
nosy: Mradul, docs at python
priority: normal
severity: normal
status: open
title: Division "/" error on Long Integers
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48787/Tested values.png

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list