代码如下:
#include<cmath> #include<cstdio> int main() { int n; scanf("%d",&n); int ans = n / 2 + (n % 2 == 1); printf("%d",ans); return 0; }