aboutsummaryrefslogtreecommitdiff
path: root/tests/ii/arithmetic/reference.cc
blob: 6d3d98f9ce2f8e7062c12040e5ec4f992264ceec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

#include <cstdint>
#include <iostream>
int main() {
    int count;
    if (!(std::cin >> count)) return 1;
    for (int i = 0; i < count; ++i) {
        std::int64_t a, b;
        if (!(std::cin >> a >> b) || b == 0) return 1;
        auto small = a % 1000001;
        std::cout << (a < b ? "TRUE" : "FALSE") << ':' << a / b << ':' << a % b
                  << ':' << small + b << ':' << small - b << ':' << small * b << '\n';
    }
}