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");
                }
            }
        }
    }
}
相关推荐
小浣熊熊熊熊熊熊熊丶2 小时前
《Effective Java》第25条:限制源文件为单个顶级类
java·开发语言·effective java
啃火龙果的兔子2 小时前
JDK 安装配置
java·开发语言
星哥说事2 小时前
应用程序监控:Java 与 Web 应用的实践
java·开发语言
等....3 小时前
Miniconda使用
开发语言·python
zfj3213 小时前
go为什么设计成源码依赖,而不是二进制依赖
开发语言·后端·golang
醇氧3 小时前
org.jetbrains.annotations的@Nullable 学习
java·开发语言·学习·intellij-idea
Java&Develop3 小时前
Aes加密 GCM java
java·开发语言·python
weixin_462446233 小时前
使用 Go 实现 SSE 流式推送 + 打字机效果(模拟 Coze Chat)
开发语言·后端·golang
JIngJaneIL3 小时前
基于springboot + vue古城景区管理系统(源码+数据库+文档)
java·开发语言·前端·数据库·vue.js·spring boot·后端
敲敲了个代码4 小时前
隐式类型转换:哈基米 == 猫 ? true :false
开发语言·前端·javascript·学习·面试·web