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

最新文章

  1. 软媒魔方 v6.2.1.0 绿色纯净版及经典版
  2. jsr133
  3. 用Backbone.js创建一个联系人管理系统(四)
  4. C++11---nullptr
  5. JavaWeb前端: JavaScript 简介
  6. IOS 欢迎页(UIScrollView,UIPageControl)
  7. [金阳光测试]IOS 自动化测试
  8. 国内HTML5前端开发框架汇总
  9. C# memcache
  10. mysql 打包表在phpmyadmin提示正在使用中..
  11. 将html导出到excel或word
  12. C# WInform 界面左导航菜单
  13. zabbix安装笔记
  14. Dynamics CRM 2011/2013 通过Javascript给lookup字段赋值
  15. MYSQL定时任务 触发器
  16. flume实现kafka到文件测试用例
  17. Re:从零开始的MySQL入门学习
  18. Django之stark组件
  19. linux command ------ watch
  20. P1081 开车旅行

热门文章

  1. Visual Studio 当前不会命中断点的问题 编辑pdf文件
  2. 批量反编译class文件
  3. 2017-02-23 错误信息:未在本地计算机上注册“Microsoft.ACE.oledb.12.0”提供程序。
  4. substr 方法
  5. android不太常用的控件
  6. 16 Python 递归函数
  7. hdu-2544-最短路(Floyd算法模板)
  8. Leetcode 904. Fruit Into Baskets
  9. GDB Core,gdb 调试大全,core文件调试
  10. C#面向对象(三):多态