csharp基础练习题:符号计数【难度:1级】:
在这个习题你将不得不使其包含数它包含的每一个符号,从2开始变换每个字符串.
符号的顺序应予以保留.
实施例:缩写=> a2b2revi2ton
编程目标:
using System;
public static class Kata
{
public static string Transform(string s)
{
throw new NotImplementedException();
}
}
测试样例:
namespace Solution
{
using NUnit.Framework;
using System;
using System.Collections.Generic;
[TestFixture]
public class BasicTests
{
get
{
yield return new TestCaseData("elevation").Returns("e2lvation");
yield return new TestCaseData("transplantology").Returns("t2ra2n2spl2o2gy");
yield return new TestCaseData("economics").Returns("ec2o2nmis");
yield return new TestCaseData("embarrassed").Returns("e2mba2r2s2d");
yield return new TestCaseData("impressive").Returns("i2mpre2s2v");
最佳答案(多种解法):
点击查看答案
更多关联题目:
免责申明
本博客所有编程题目及答案均收集自互联网,主要用于供网友学习参考,如有侵犯你的权益请联系管理员及时删除,谢谢
题目收集至https://www.codewars/
https://www.codewars/kata/symbols-counted
更多推荐
csharp基础练习题:符号计数【难度:1级】--景越C#经典编程题库,不同难度C#练习题,适合自学C#的新手进阶训练
发布评论