野生小松鼠的答案

野生小松鼠 · 发布于 2022-10-15 · 浏览 668 回复 0
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a, b, c;
	scanf("%d", &a);
	if(a % 2 == 0)
	{
		b = a / 2;
		printf("%d", b);
	}
	if(a % 2 != 0)
	{
		c = (a + 1) / 2;
		printf("%d", c);
	}
	return 0;
}

全部回复 共 0 条

还没有人回复。往下写第一条。

发表回复