How does python float division work when numerator and denominator are integers and evenly divisible without decimal points?

后端 未结 0 385
长发绾君心
长发绾君心 2020-12-05 02:55

I tested these calculations

n = 773160767  
n*(n+1)      
n*(n+1)/2
n*(n+1)//2

n*(n+1)/2 % (10**9+7)
n*(n+1)//2 % (10**9+7)

Output:



        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题