ABC034B - ペア
問題:B - ペア
#include <iostream> using namespace std; int main(void) { int n; cin.tie(0); ios::sync_with_stdio(false); cin >> n; cout << (n % 2? n + 1 : n - 1) << "\n"; return 0; }
問題:B - ペア
#include <iostream> using namespace std; int main(void) { int n; cin.tie(0); ios::sync_with_stdio(false); cin >> n; cout << (n % 2? n + 1 : n - 1) << "\n"; return 0; }