5 条题解
- 1
信息
- ID
- 161
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 5
- 标签
- 递交数
- 5470
- 已通过
- 2091
- 上传者
这才叫最短,请不要颠覆了它👀️
#include <iostream>
int main(){
int a;
std::cin>>a;
if(a%2) std::cout<<"odd";
else std::cout<<"even";
return 0;}
最短代码:
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
if (n % 2 == 1)
{
cout << "odd";
return 0;
}
cout << "even";
return 0;
}
额~~~
#include<bits/stdc++.h>
int main(){int a; std::cin >> a; if(a%2==0) std::cout << "even"; else std::cout << "odd"; return 0;}
#include<bits/stdc++.h>
using namespace std;
int main(){
int a;
cin>>a;
if (a%2==1)
{
cout <<"odd";
}
else
{
cout <<"even";
}
return 0;
}
//这个真的没有技术含量