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");
                }
            }
        }
    }
}
相关推荐
u***27614 小时前
C#数据库操作系列---SqlSugar完结篇
网络·数据库·c#
p***h6435 小时前
JavaScript在Node.js中的异步编程
开发语言·javascript·node.js
散峰而望5 小时前
C++数组(二)(算法竞赛)
开发语言·c++·算法·github
Porunarufu5 小时前
Java·关于List
java·开发语言
子不语1805 小时前
Python——函数
开发语言·python
ndjnddjxn5 小时前
Rust学习
开发语言·学习·rust
月光技术杂谈5 小时前
实战:C驱动框架嵌入Rust模块的互操作机制与完整流程
c语言·开发语言·rust·ffi·跨语言·bindgen·互操作
t198751285 小时前
基于MATLAB的指纹识别系统完整实现
开发语言·matlab
笑非不退6 小时前
C# c++ 实现程序开机自启动
开发语言·c++·c#
专注于大数据技术栈6 小时前
java学习--final
java·开发语言·学习