刷題證明
A | CodeForces 4A | Watermelon |
#include<bits\stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
if(n%2==0&&n!=2){
cout<<"YES"<<'\n';
}else{
cout<<"NO"<<'\n';
}
}
B | CodeForces 1335A | Candies and Two Sisters |
#include<bits\stdc++.h>
using namespace std;
int main()
{
long n;
int i;
cin>>i;
while(i--)
{
cin>>n;
cout<<(n-1)/2<<'\n';
}
}
D | CodeForces 486A | Calculating Function |
#include<bits\stdc++.h>
using namespace std;
int main(void)
{
long long n;
cin >> n;
if (n % 2 !=0)
{
cout << (n + 1) / 2 * (-1);
}
else
{
cout << (n / 2);
}
return 0;
}
E | CodeForces 617A | Elephant |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int step;
int ans=0.0;
cin>>step;
if(step%5==0)
{
ans=step/5;
}
else
{
ans=(step/5)+1;
}
cout<<ans;
return 0;
}