2 条题解

  • 2
    @ 2026-5-23 15:12:17
    #include <bits/stdc++.h>
    using namespace std;
    
    int main() {
    	long long a;
    	cin>>a;
    	if(a>0){
    		cout<<"positive";
    	} else if(a==0){
    		cout<<"zero";
    	} else if(a<0){
    		cout<<"negative";
    	}
    	return 0;
    }
    
    
    • 2
      @ 2026-5-23 10:46:45

      #include <bits/stdc++.h> using namespace std;

      int main() {

      int b; cin >> b; if(b>0){ cout<<"positive";

      }else if(b<0){ cout<<"negative"; }else{ cout<<"zero"; } return 0; }

      • 1

      信息

      ID
      30924
      时间
      1000ms
      内存
      256MiB
      难度
      7
      标签
      (无)
      递交数
      302
      已通过
      78
      上传者