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");
                }
            }
        }
    }
}
相关推荐
阿里嘎多学长7 分钟前
2026-05-30 GitHub 热点项目精选
开发语言·程序员·github·代码托管
魔法阵维护师7 分钟前
从零开发游戏需要学习的c#模块,第三十三章(暂停菜单)
学习·游戏·c#
wapicn999 分钟前
API接口调试笔记:从注册到第一个数据返回,全流程详解
java·开发语言·python·lua
.千余14 分钟前
【Linux】 TCP进阶详解:字节流、粘包问题、异常情况与UDP完整对比2
linux·运维·c语言·开发语言·经验分享·笔记·php
geovindu15 分钟前
python: Bounded Parallelism Pattern
开发语言·python·设计模式·有界并行模式
大明者省18 分钟前
Ubuntu Python 部署终极版教程
开发语言·python·ubuntu
光影少年19 分钟前
Redux Toolkit 用法、解决原生Redux 冗余问题
开发语言·前端·javascript·react.js·中间件·前端框架·ecmascript
KANGBboy25 分钟前
java知识二(数组)
java·开发语言·python
零陵上将军_xdr28 分钟前
后端转全栈学习-Day3-JavaScript 基础-1
开发语言·javascript·学习
llilay31 分钟前
企业级FastAPI后端模板搭建(二)整合路由Router
开发语言·python·fastapi