Submission #1873364


Source Code Expand

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
	long long int a;
	cin>>a;
	if(a%2==0;){
		cout<<a-1<<endl;
	}else{
		cout<<a+1<<endl;
	}
	
}

Submission Info

Submission Time
Task B - ペア
User Athena
Language C++14 (GCC 5.4.1)
Score 0
Code Size 195 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:8:11: error: expected ‘)’ before ‘;’ token
  if(a%2==0;){
           ^
./Main.cpp:8:12: error: expected primary-expression before ‘)’ token
  if(a%2==0;){
            ^
./Main.cpp:10:3: error: ‘else’ without a previous ‘if’
  }else{
   ^