题解 | #牛牛的替换#

牛牛的替换

https://www.nowcoder.com/practice/f2a107dbb99243798d3048a672e8f747

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s1  = in.nextLine();
        String[] s2 = s1.split(" "); 
        String s = in.nextLine();
        String s3 = s.replace(s2[1],s2[2]);
        String s4 = s3.replace(s2[3],s2[4]);
        System.out.println(s4);

    }
}

全部评论

相关推荐

SadnessAlex:跟三十五岁原则一样,人太多给这些***惯坏了
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务