2019-07-07から1日間の記事一覧
問題: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; }</iostream>
問題: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; }</iostream>