title: Why Python losing some value during computing?
body: <p>I am trying to solve a problem from codeforces using Python. but I got wrong answer then I used C++ and got accepted. although I used same formula for both language. I don't understand my mistake.</p>
  <p>Here is the problem link: <a href="https://codeforces.com/contest/1371/problem/B" rel="nofollow noreferrer">https://codeforces.com/contest/1371/problem/B</a>
  <strong>my Python Solution:</strong></p>
  <pre><code>
  t=int(input())
   
  while(t &gt;0):
      t = t-1 
   
      n,m = (input()).split()
      a=int(n)
      b=int(m)
   
      if(a &gt;b ):
          ans= (b+1)*b /2
          print(int (ans))
      else:
          a=a-1
          ans = (a + 1) * a / 2
          print(int (ans+1))
  </code></pre>
  <p><strong>my C++ Solution:</strong></p>
  <pre><code>
  #include&lt;bits/stdc++.h&gt;
  #define ll long long
  using namespace std;
  int main()
  {
      int q;
      cin&gt;&gt;q;
     while(q--)
      {
          ll a,b;
          cin&gt;&gt;a&gt;&gt;b;
  
          if(a &gt; b )
          {
              cout&lt;&lt; (b*(b+1))/2&lt;&lt;endl;
          }
          else
          {
              a--;
              cout&lt;&lt; (a*(a+1))/2 +1 &lt;&lt;endl;
          }
      }
    return 0;
  }
  </code></pre>
  <p>And the test case in which i got wrong answer: 1000000000 818008580</p>
  <p>expected: '334569018885812490', found: '334569018885812480'</p>