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");
                }
            }
        }
    }
}
相关推荐
小努蛋12 分钟前
linux编译openresty异常问题,lua_cjson.c:706:5: 错误: ‘for‘ 循环初始化声明只在 C99 或 C++ 模式下允许
开发语言·lua·openresty
qz_Serene27 分钟前
C++:类和对象(上)
开发语言·c++
唐青枫33 分钟前
别把 ImmutableArray 当成只读 List:C#.NET 不可变数组深入详解
c#·.net
西安景驰电子1 小时前
《PTP精确时间协议系列》第一篇:从原理到应用,全面解读IEEE 1588
linux·运维·服务器·开发语言·网络·windows·php
ctlover1 小时前
Python文件操作
开发语言·python
luj_17681 小时前
塔防牌:策略与卡牌的智慧碰撞
服务器·c语言·开发语言·经验分享·算法
wuyk5551 小时前
3.链表:用指针串联的动态数据结构
c语言·开发语言·数据结构·链表
weixin_383196472 小时前
java基础面试题@Autowired和@Resource区别
java·开发语言
言乐63 小时前
Python游戏水平测试辅助系统2
开发语言·windows·python·游戏·django