~cpp #include <iostream.h> int find_min_sum(int bound_num) { int n = 1; while ((n * n + n) / 2 < bound_num) n++; return n; } inline void show_min_sum(int n) { cout << n << " " << (n * n + n) / 2 << endl; } void main() { show_min_sum(find_min_sum(3000)); }