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");
                }
            }
        }
    }
}
相关推荐
王九思4 小时前
Java 内存分析工具 MAT
java·开发语言·安全
superman超哥4 小时前
Serde 的零成本抽象设计:深入理解 Rust 序列化框架的哲学
开发语言·rust·开发工具·编程语言·rust序列化
夕除4 小时前
java--2
java·开发语言
星辰徐哥4 小时前
Rust函数与流程控制——构建逻辑清晰的系统级程序
开发语言·后端·rust
liliangcsdn4 小时前
如何使用lambda对python列表进行排序
开发语言·python
java 乐山5 小时前
c 写一个文本浏览器(1)
c语言·开发语言
windows_65 小时前
MISRA C:2025 规则逐条分析
c语言·开发语言
fie88896 小时前
基于MATLAB的可见光通信(VLC)系统仿真
开发语言·matlab
写代码的【黑咖啡】6 小时前
Python中的lxml:高效XML处理库
xml·开发语言·python
黎雁·泠崖6 小时前
Java字符串高阶:底层原理深剖+经典面试题全解
java·开发语言