2 条题解

  • 1
    @ 2026-7-4 9:48:50
    #include <bits/stdc++.h>
    using namespace std;
    
    int main() {
    	int a, b, c;
    	double d;
    	cin >> a >> b >> c;
    	d = (a + b + c) / 3;
    	if (d >= 90) {
    		cout << "beijing";
    	} else {
    		cout << "nanjing";
    	}
    	return 0;
    }
    
    
    
    
    • 0
      @ 2026-6-7 21:49:57

      #include using namespace std;

      int main() { int x, y, z; cin >> x >> y >> z;

      // 计算总分(不用算小数,直接用总分判断更简单)
      int sum = x + y + z;
      
      // 平均分 >=90 等价于 总分 >= 270
      if (sum >= 270) {
          cout << "beijing" << endl;
      } else {
          cout << "nanjing" << endl;
      }
      
      return 0;
      

      }

    • 1

    信息

    ID
    30681
    时间
    1000ms
    内存
    256MiB
    难度
    9
    标签
    递交数
    10
    已通过
    9
    上传者