You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
int main() {
|
|
int n;
|
|
cin >> n;
|
|
for (int i = 0;; i++)
|
|
for (int j = 0; j <= i; j++) {
|
|
if (i - j == n && i == 4 * j - 30) {
|
|
printf("%d %d\n", i, j);
|
|
exit(0);
|
|
}
|
|
}
|
|
return 0;
|
|
} |