提出 #695153
ソースコード 拡げる
#include<iostream>
#include<string>
using namespace std;
int main() {
int n;
cin >> n;
if (n % 2) { cout << n + 1 << endl; }
else { cout << n - 1 << endl; }
return 0;
}
提出情報
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | s0.txt, s1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, s0.txt, s1.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 000.txt | AC | 26 ms | 796 KiB |
| 001.txt | AC | 26 ms | 920 KiB |
| 002.txt | AC | 23 ms | 800 KiB |
| 003.txt | AC | 25 ms | 928 KiB |
| 004.txt | AC | 26 ms | 792 KiB |
| 005.txt | AC | 26 ms | 792 KiB |
| 006.txt | AC | 26 ms | 916 KiB |
| 007.txt | AC | 26 ms | 912 KiB |
| 008.txt | AC | 26 ms | 796 KiB |
| 009.txt | AC | 27 ms | 920 KiB |
| 010.txt | AC | 25 ms | 792 KiB |
| 011.txt | AC | 26 ms | 804 KiB |
| 012.txt | AC | 26 ms | 800 KiB |
| 013.txt | AC | 27 ms | 800 KiB |
| 014.txt | AC | 27 ms | 676 KiB |
| 015.txt | AC | 25 ms | 672 KiB |
| 016.txt | AC | 26 ms | 800 KiB |
| 017.txt | AC | 24 ms | 916 KiB |
| 018.txt | AC | 25 ms | 800 KiB |
| 019.txt | AC | 26 ms | 920 KiB |
| s0.txt | AC | 26 ms | 924 KiB |
| s1.txt | AC | 26 ms | 920 KiB |