1 条题解

  • 0
    @ 2025-4-14 18:41:38

    C++ :

    #include<iostream>
    #include<cstdio>
    using namespace std;
    int main()
    {
    	int head,foot;
    	cin>>head>>foot;
    	int j,t;
    	j=2*head;
    	t=(foot-j)/2;
    	j=head-t;
    	cout<<j<<' '<<t<<endl;
    	return 0;	
    }
    
    

    Pascal :

    var  a,b,c,d:integer;
    begin
      readln(a,b);
      c:=(a*4-b) div 2;
      d:=(b-c*2) div 4;
      write(c,' ',d);
    end.
    
    
    • 1

    信息

    ID
    3199
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者