結果

問題 No.1636 森
ユーザー miraissan
提出日時 2023-12-12 11:48:09
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 171 bytes
コンパイル時間 1,442 ms
コンパイル使用メモリ 164,948 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-27 04:54:35
合計ジャッジ時間 2,384 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 1 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

using namespace std;
#include <bits/stdc++.h>

int main(){
	int N;
	cin >> N;
	if (N % 2 == 0){
		cout << N-1 << endl; 
	}else if (N % 2 == 1){
		cout << N+1 << endl;
	}
}
0