全部评论 2

  • 我Python代码都比你快!
    代码如下:
    l=[]
    inp=[]
    unhappy=[]
    for i in range(7):
    inp=input().split(" ")
    inp[0]=int(inp[0])
    inp[1]=int(inp[1])
    l.append(inp)
    for i in l:
    if sum(i)>7:
    unhappy.append(sum(i))
    else:
    unhappy.append(0)
    if sum(unhappy)==0:
    print(0)
    else:
    x=max(unhappy)
    for i in range(len(unhappy)):
    if unhappy[i]==x:
    print(i+1)
    break

    2025-12-21 来自 北京

    0
  • #include<bits/stdc++.h>
    using namespace std;
    int main(){
    int a, b;
    int max_val=-1;
    int day=0;
    for (int i=0;i<7;i++) {
    cin>>a>>b;
    int t=a+b;
    if (t>8) {
    if (t>max_val) {
    max_val=t;
    day=i+1;
    }
    }
    }
    if (day==0) {
    cout<<0;
    } else {
    cout<<day;
    }
    return 0;
    }

    2025-09-15 来自 上海

    0
暂无数据

提交答案之后,这里将显示提交结果~

首页