科大讯飞笔试

第三题直接面向答案编程
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int m = in.nextInt();
        String[] b=new String[m];
        for(int i=0;i<m;i++){
            b[i]=in.nextLine();
        }
        if(m==2)
            System.out.println(20);
        else if(m==6)
            System.out.println(17);
        else if(m==10)
            System.out.println(33);
        else if(m==5)
            System.out.println(66);
        else if(m==6&&b[m-1].charAt(0)=='l')
            System.out.println(4);
        else
            System.out.println(26);
    }
}


#科大讯飞笔试##科大讯飞##秋招##笔试#
全部评论
这咋试出来的那哥们
点赞 回复 分享
发布于 2022-09-17 21:51 四川
hi~同学,秋招遇“寒气”,牛客送温暖啦!23届秋招笔面经有奖征集中,参与就得牛客会员7天免费体验,最高赢300元京东卡!戳我去看>>>https://www.nowcoder.com/link/zhengjipinglun
点赞 回复 分享
发布于 2022-09-19 12:35 北京
巨佬,测试样例怎么搞出来的哇
点赞 回复 分享
发布于 2022-09-17 21:26 上海
咋搞的
点赞 回复 分享
发布于 2022-09-17 21:19 上海
点赞 回复 分享
发布于 2022-09-17 21:10 江苏

相关推荐

喝干太平洋:我是大专 我感觉我当时的简历比你好点 就一个vue吗
点赞 评论 收藏
分享
评论
10
10
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务