fork download
  1. int main() {
  2. typedef long long BigInteger;
  3. BigInteger max/*("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF");*/ = 0x0FFFFFFFFFFFFFFF;
  4.  
  5. for(BigInteger x0=1; x0<max;x0 *= 2) {
  6. for(BigInteger x1=x0-1; x1<x0-2; ++x1) {
  7. for(BigInteger y0=1; y0<=x; y0*= 2) {
  8. for(BigInteger y1=y0-1; y1<=y0+1; ++y1) {
  9. BigInteger p(x1*y1);
  10. assert(p/x1==y1);
  11. assert(p/y1==x1);
  12. }
  13. }
  14. }
  15. }
  16. std::cout << "PASSED DIVISION TESTS";
  17.  
  18. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty