2 条题解

  • 1
    @ 2026-6-5 15:21:43
    using namespace std;
    int main() {
        
        long long h,s;
        cin>>h>>s;
        if(h>s){
        	cout<<h-s;
    	}else{
    		cout<<-1;
    	}
    
        return 0;
    }
    
    
    • 1
      @ 2025-12-31 15:14:11

      入门题。 这一题唯一的难点在于要开 long long

      #include <iostream>
      using namespace std;
      
      int main()
      {
      	ios::sync_with_stdio(false);
      	cin.tie(nullptr);
      	long long h,s;
      	cin>>h>>s;
      	if(h>s) cout<<h-s;
      	else cout<<-1;
      	return 0;
      }
      
      • 1

      信息

      ID
      7
      时间
      1000ms
      内存
      256MiB
      难度
      1
      标签
      递交数
      219
      已通过
      60
      上传者