leetcode423
2024-09-04 11:11:08
public class Solution {
public string OriginalDigits(string s) {
int[] count = new int[];
for (int i = ; i < s.Length; i++)
{
char c = s[i];
if (c == 'z') count[]++;
if (c == 'w') count[]++;
if (c == 'x') count[]++;
if (c == 's') count[]++; //7-6
if (c == 'g') count[]++;
if (c == 'u') count[]++;
if (c == 'f') count[]++; //5-4
if (c == 'h') count[]++; //3-8
if (c == 'i') count[]++; //9-8-5-6
if (c == 'o') count[]++; //1-0-2-4
}
count[] -= count[];
count[] -= count[];
count[] -= count[];
count[] = count[] - count[] - count[] - count[];
count[] = count[] - count[] - count[] - count[];
StringBuilder sb = new StringBuilder();
for (int i = ; i <= ; i++)
{
for (int j = ; j < count[i]; j++)
{
sb.Append(i);
}
}
return sb.ToString();
}
}
https://leetcode.com/problems/reconstruct-original-digits-from-english/#/description
最新文章
- 软媒魔方 v6.2.1.0 绿色纯净版及经典版
- jsr133
- 用Backbone.js创建一个联系人管理系统(四)
- C++11---nullptr
- JavaWeb前端: JavaScript 简介
- IOS 欢迎页(UIScrollView,UIPageControl)
- [金阳光测试]IOS 自动化测试
- 国内HTML5前端开发框架汇总
- C# memcache
- mysql 打包表在phpmyadmin提示正在使用中..
- 将html导出到excel或word
- C# WInform 界面左导航菜单
- zabbix安装笔记
- Dynamics CRM 2011/2013 通过Javascript给lookup字段赋值
- MYSQL定时任务 触发器
- flume实现kafka到文件测试用例
- Re:从零开始的MySQL入门学习
- Django之stark组件
- linux command ------ watch
- P1081 开车旅行
热门文章
- Visual Studio 当前不会命中断点的问题 编辑pdf文件
- 批量反编译class文件
- 2017-02-23 错误信息:未在本地计算机上注册“Microsoft.ACE.oledb.12.0”提供程序。
- substr 方法
- android不太常用的控件
- 16 Python 递归函数
- hdu-2544-最短路(Floyd算法模板)
- Leetcode 904. Fruit Into Baskets
- GDB Core,gdb 调试大全,core文件调试
- C#面向对象(三):多态