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");
                }
            }
        }
    }
}
相关推荐
W_3260037 分钟前
Python文件进阶:一维数据与 CSV 文件读写
开发语言·python
Tyler_TXZ1 小时前
C++C语言之——二叉树
c语言·开发语言·数据结构·c++·二叉树
不会代码的小猴1 小时前
C++新增关键字
开发语言·c++·笔记
yaoxin5211231 小时前
497. Java 反射 - 使用反射读取注解
java·开发语言·python
2019一路前行2 小时前
Python 函数式编程
开发语言·python
冯汉栩2 小时前
Swift Control View,Label渐变颜色(源码)
开发语言·ios·swift
从小就看凹凸曼^o^4 小时前
Python基础5 - 字典与集合:(1)字典
开发语言·python
Herbert_hwt4 小时前
第七章 Java深入理解枚举类型
java·开发语言·算法
侧耳倾听1114 小时前
java 日志框架简介
java·开发语言
zlinear数据采集卡4 小时前
数据采集卡从入门到精通(9):分辨率与精度——16位卡不等于1/65536的精度
开发语言·数据库·fpga开发·开源·c#