找不到工作的Mr.Right level
获赞
66
粉丝
10
关注
4
看过 TA
830
门头沟学院
2024
Java
IP属地:河南
暂未填写个人简介
私信
关注
老哥们帮我看看为啥只过了77%package test;import java.util.*;public class two {    public static void main(String[] args) {        Scanner sc = new Scanner(System.in);        int n = sc.nextInt();        int q = sc.nextInt();        long[] a = new long[n];        long count = 0;        long sum = 0;        long l;        long r;        for (int i = 0; i             a[i] = sc.nextLong();            sum += a[i];            if (a[i] == 0) {                count++;            }        }        while (sc.hasNext()) {             l = sc.nextLong();             r = sc.nextLong();            System.out.print(sum + l * count + " ");            System.out.print(sum + r * count + " ");            System.out.println();        }    }}
投递美团等公司10个岗位
0 点赞 评论 收藏
转发
0 点赞 评论 收藏
转发
牛客网
牛客企业服务