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");
                }
            }
        }
    }
}
相关推荐
灯澜忆梦1 小时前
Go 语言 _JSON---序列化与反序列化
开发语言·golang·json
麻瓜老宋1 小时前
AI开发C语言应用按步走,表达式计算器calc的第四步,交互式 REPL 模式
c语言·开发语言·atomcode
猫猫不是喵喵.2 小时前
双亲委派机制与类加载过程
java·开发语言
布朗克1682 小时前
Go入门到精通-22-同步原语
开发语言·后端·golang·同步原语
帅次2 小时前
Kotlin Flow 与 StateFlow:UI 单向数据流基础
开发语言·ui·kotlin·stateflow·onlifecycle
艾伦野鸽ggg2 小时前
JavaScript 浏览器本地存储
开发语言·javascript·ecmascript
杜子不疼.2 小时前
【Qt常用控件】WindowTitle 与 WindowIcon:窗口标题和图标
开发语言·qt
czhc11400756633 小时前
719:StartPoint;Margin;ResourceDictionar;Component.model;lds;
c#
AOwhisky3 小时前
Python 学习笔记(第十一期)——运维自动化(上·后篇):进程级监控与子进程管理——psutil进阶
运维·开发语言·python·学习·云原生·运维开发
人工干智能3 小时前
Python 的链式调用:一连串的“点”调用
开发语言·python