fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. unsigned long long la = 1LL << 60, lb = 1LL << 6;
  5. double a = la, b = lb;
  6. double r1 = (((a + b) + b) + b) + b;
  7. double r2 = a + ((b + b) + (b + b));
  8.  
  9. unsigned long long ll1 = r1, ll2 = r2;
  10. unsigned long long true_res = la + 4 * lb;
  11. std::cout << ll1 << '\n' << ll2 << '\n' << true_res << '\n';
  12. return 0;
  13. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
1152921504606846976
1152921504606847232
1152921504606847232