您当前的位置: 首页 >  TechGuide

度小满笔试两道编程题2020/09/20

TechGuide 发布时间:2020-09-21 02:30:21 ,浏览量:5

备战秋招面试 微信搜索公众号【TechGuide】关注更多新鲜好文和互联网大厂的笔经面经。 作者@TechGuide 点赞再看,养成习惯,您动动手指对原创作者意义非凡🤝

第一题、模拟涂色游戏

import java.util.*;
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String inHand = sc.nextLine();
        String toPrint = sc.nextLine();
        if(inHand==null || inHand.length()==0 || toPrint==null || toPrint.length()==0) System.out.println(0);
        char[] colors = inHand.toCharArray();
        char[] boards = toPrint.toCharArray();
        HashMap map = new HashMap();
        for (int i = 0; i             
关注
打赏
1688896170
查看更多评论
0.0489s