using ull = unsigned long long;constexpr ull Modulus = 10000000000ULL; inline ull modMul(const ull x, const ull y) { if (x > (1<<30) && y > (1 << 30)) return ((x >> 30)*((y << 30) % Modulus) + y*(x & ((1 << 30) - 1))) % Modulus; ull z = x*y; if (z >= Modulus) z %= Modulus; return z;}
Standard input is empty
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!