#include <bits/stdc++.h> using namespace std; long long n; int main() { cin >> n; if (n % 2 == 0) { cout << n / 2; } else { cout << n / 2 + 1; } return 0; }
#include<bits/stdc++.h> using namespace std; int main(){ freopen("print.in","r",stdin); freopen("print.out","w",stdout); int n; cin>>n; if(n%2==0) cout<<n/2;//双数直接除二输出。 else cout<<n/2+1;//奇数加1除2输出。 return 0; }
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.
Using your Hydro universal account