2 solutions

  • 2
    @ 2025-9-23 12:28:11
    #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;
    }
    

    Information

    ID
    1065
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    6
    Tags
    # Submissions
    30
    Accepted
    11
    Uploaded By