L1-059 敲笨钟 c#

csharp 复制代码
using System.Collections;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System;
namespace class20240724
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int count = int.Parse(Console.ReadLine());
            for(int i = 0; i < count; i++)
            {
                string line = Console.ReadLine();
                string[] arr = line.Split(',');
                if (arr[0].EndsWith("ong") && arr[1].EndsWith("ong."))
                {
                    string[] arr2 = arr[1].Split();
                    arr2[arr2.Length - 1] = "zhong.";
                    arr2[arr2.Length - 2] = "ben";
                    arr2[arr2.Length - 3] = "qiao";
                    string merge = string.Join(" ", arr2);
                    Console.WriteLine(arr[0]+","+merge);
                }
                else
                {
                    Console.WriteLine("Skipped");
                }
            }
        }
    }
}
相关推荐
ComputerInBook12 小时前
C++ 中的 lambda 表达式
开发语言·c++·lambda表达式·匿名函数
ZC跨境爬虫12 小时前
跟着 MDN 学 HTML day_52:(深入 XPathExpression 接口)
开发语言·前端·javascript·ui·html·音视频
雪豹阿伟12 小时前
2.C# —— 结构体、类型转换与运算符
c#·上位机
yuanpan12 小时前
Python + Selenium 浏览器自动化测试与网页自动登录
开发语言·python·selenium
Wy_编程12 小时前
Go语言中的指针
开发语言·后端·golang
不想写代码的星星13 小时前
C++协程从入门到放弃?不,是从入门到手搓调度器
开发语言·c++
lolo大魔王13 小时前
Go语言数据库操作之GORM框架从入门到生产实战(完整版)
开发语言·数据库·golang
cndes13 小时前
Pycharm的虚拟环境设置问题
开发语言·python
河阿里13 小时前
Java包装类(Wrapper):自动装箱拆箱机制与类型转换的那些坑
java·开发语言
jekc86813 小时前
金蝶云星空调用第三方接口
开发语言·python