aboutsummaryrefslogtreecommitdiff
path: root/tests/ii/calls/reference.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ii/calls/reference.cc')
-rw-r--r--tests/ii/calls/reference.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ii/calls/reference.cc b/tests/ii/calls/reference.cc
new file mode 100644
index 0000000..c5ca6ca
--- /dev/null
+++ b/tests/ii/calls/reference.cc
@@ -0,0 +1,12 @@
+#include <cstdint>
+#include <iostream>
+int main() {
+ int count;
+ if (!(std::cin >> count)) return 1;
+ for (int i = 0; i < count; ++i) {
+ std::int64_t n, x, y;
+ if (!(std::cin >> n >> x >> y)) return 1;
+ std::cout << x + y << ':' << x << ':' << x + 1 << ':' << y - 1
+ << ':' << n * (n + 1) / 2 << '\n';
+ }
+}