1 solutions

  • 0
    @ 2025-11-5 15:31:57

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int a;
    int main(){
    	cin>>a;
    	if(a%2==0)cout<<a/2<<" "<<a/2;
    	else cout<<a/2<<" "<<a/2+1;
        return 0;
    }
    

    Pascal :

    var a:integer;
      begin
        readln(a);
        writeln(a div 2,' ',a-a div 2);
      
      end.
    
    • 1

    Information

    ID
    16894
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By