当前位置: 首页 > news >正文

网站建站网站496565济南优化哪家好

网站建站网站496565,济南优化哪家好,WordPress搭建手机网站,湖州做网站优化力扣题-12.2 [力扣刷题攻略] Re:从零开始的力扣刷题生活 力扣题1:423. 从英文中重建数字 解题思想:有的单词通过一个字母就可以确定,依次确定即可 class Solution(object):def originalDigits(self, s):""":typ…

力扣题-12.2

[力扣刷题攻略] Re:从零开始的力扣刷题生活

力扣题1:423. 从英文中重建数字

解题思想:有的单词通过一个字母就可以确定,依次确定即可

在这里插入图片描述

class Solution(object):def originalDigits(self, s):""":type s: str:rtype: str"""char_count = {}t = 'egfihonsrutwvxz'for i in range(len(t)):char_count[t[i]] = 0for i in range(len(s)):if s[i] in char_count:char_count[s[i]] += 1else:char_count[s[i]] = 1result = []if char_count['z']!=0:for i in range(char_count['z']):result.append(0)temp = 'zero'for i in range(len(temp)):char_count[temp[i]] -=1if char_count['x']!=0:for i in range(char_count['x']):result.append(6)temp = 'six'for i in range(len(temp)):char_count[temp[i]] -=1if char_count['w']!=0:for i in range(char_count['w']):result.append(2)temp = 'two'for i in range(len(temp)):char_count[temp[i]] -=1if char_count['g']!=0:for i in range(char_count['g']):result.append(8)temp = 'eight'for i in range(len(temp)):char_count[temp[i]] -=1if char_count['s']!=0:for i in range(char_count['s']):result.append(7)temp = 'seven'for i in range(len(temp)):char_count[temp[i]] -=1if char_count['h']!=0:for i in range(char_count['h']):result.append(3)temp = 'three'for i in range(len(temp)):char_count[temp[i]] -=1if char_count['v']!=0:for i in range(char_count['v']):result.append(5)temp = 'five'for i in range(len(temp)):char_count[temp[i]] -=1if char_count['f']!=0:for i in range(char_count['f']):result.append(4)temp = 'four'for i in range(len(temp)):char_count[temp[i]] -=1if char_count['o']!=0:for i in range(char_count['o']):result.append(1)temp = 'one'for i in range(len(temp)):char_count[temp[i]] -=1if char_count['i']!=0:for i in range(char_count['i']):result.append(9)temp = 'nine'for i in range(len(temp)):char_count[temp[i]] -=1return ''.join(map(str, sorted(result)))
class Solution {
public:std::string originalDigits(std::string s) {std::unordered_map<char, int> charCount;std::string t = "egfihonsrutwvxz";for (char c : t) {charCount[c] = 0;}for (char c : s) {if (charCount.find(c) != charCount.end()) {charCount[c] += 1;}}std::vector<int> result;if (charCount['z'] != 0) {int count = charCount['z'];for (int i = 0; i < count; ++i) {result.push_back(0);std::string temp = "zero";for (char c : temp) {charCount[c] -= 1;}}}if (charCount['x'] != 0) {int count = charCount['x'];for (int i = 0; i < count; ++i) {result.push_back(6);std::string temp = "six";for (char c : temp) {charCount[c] -= 1;}}}if (charCount['w'] != 0) {int count = charCount['w'];for (int i = 0; i < count; ++i) {result.push_back(2);std::string temp = "two";for (char c : temp) {charCount[c] -= 1;}}}if (charCount['g'] != 0) {int count = charCount['g'];for (int i = 0; i < count; ++i) {result.push_back(8);std::string temp = "eight";for (char c : temp) {charCount[c] -= 1;}}}if (charCount['s'] != 0) {int count = charCount['s'];for (int i = 0; i < count; ++i) {result.push_back(7);std::string temp = "seven";for (char c : temp) {charCount[c] -= 1;}}}if (charCount['h'] != 0) {int count = charCount['h'];for (int i = 0; i < count; ++i) {result.push_back(3);std::string temp = "three";for (char c : temp) {charCount[c] -= 1;}}}if (charCount['v'] != 0) {int count = charCount['v'];for (int i = 0; i < count; ++i) {result.push_back(5);std::string temp = "five";for (char c : temp) {charCount[c] -= 1;}}}if (charCount['f'] != 0) {int count = charCount['f'];for (int i = 0; i < count; ++i) {result.push_back(4);std::string temp = "four";for (char c : temp) {charCount[c] -= 1;}}}if (charCount['o'] != 0) {int count = charCount['o'];for (int i = 0; i < count; ++i) {result.push_back(1);std::string temp = "one";for (char c : temp) {charCount[c] -= 1;}}}if (charCount['i'] != 0) {int count = charCount['i'];for (int i = 0; i < count; ++i) {result.push_back(9);std::string temp = "nine";for (char c : temp) {charCount[c] -= 1;}}}std::sort(result.begin(), result.end());std::string resultString;for (int digit : result) {resultString += std::to_string(digit);}return resultString;}
};

文章转载自:
http://priggism.hmxb.cn
http://mestranol.hmxb.cn
http://unmeasurable.hmxb.cn
http://caduceus.hmxb.cn
http://bedew.hmxb.cn
http://neuromata.hmxb.cn
http://prepreg.hmxb.cn
http://subjoin.hmxb.cn
http://reposefully.hmxb.cn
http://microgramme.hmxb.cn
http://dustheap.hmxb.cn
http://niedersachsen.hmxb.cn
http://cite.hmxb.cn
http://geodynamics.hmxb.cn
http://insignificant.hmxb.cn
http://atomry.hmxb.cn
http://moppie.hmxb.cn
http://intonate.hmxb.cn
http://bicentric.hmxb.cn
http://otaru.hmxb.cn
http://ceiling.hmxb.cn
http://troutlet.hmxb.cn
http://penult.hmxb.cn
http://teachership.hmxb.cn
http://lonesome.hmxb.cn
http://ufology.hmxb.cn
http://diseconomy.hmxb.cn
http://dbe.hmxb.cn
http://subvert.hmxb.cn
http://deification.hmxb.cn
http://syngas.hmxb.cn
http://damaging.hmxb.cn
http://improvident.hmxb.cn
http://drachma.hmxb.cn
http://limerick.hmxb.cn
http://nuncupation.hmxb.cn
http://acidulous.hmxb.cn
http://catarrhal.hmxb.cn
http://partialness.hmxb.cn
http://symbolically.hmxb.cn
http://wizardry.hmxb.cn
http://uncultivated.hmxb.cn
http://trochar.hmxb.cn
http://stark.hmxb.cn
http://discriminably.hmxb.cn
http://informationless.hmxb.cn
http://abdomen.hmxb.cn
http://tearproof.hmxb.cn
http://headwater.hmxb.cn
http://laser.hmxb.cn
http://slavophobist.hmxb.cn
http://midrib.hmxb.cn
http://interdental.hmxb.cn
http://balkanization.hmxb.cn
http://woodcarver.hmxb.cn
http://labouratory.hmxb.cn
http://clap.hmxb.cn
http://bigot.hmxb.cn
http://reparations.hmxb.cn
http://flavine.hmxb.cn
http://phoenicaceous.hmxb.cn
http://wearability.hmxb.cn
http://blanket.hmxb.cn
http://linguodental.hmxb.cn
http://underbite.hmxb.cn
http://donnard.hmxb.cn
http://chortle.hmxb.cn
http://duvetine.hmxb.cn
http://reestablishment.hmxb.cn
http://undermanned.hmxb.cn
http://tragic.hmxb.cn
http://involuntary.hmxb.cn
http://sparrow.hmxb.cn
http://toastmaster.hmxb.cn
http://insipidness.hmxb.cn
http://rattle.hmxb.cn
http://fluf.hmxb.cn
http://klaxon.hmxb.cn
http://pneumatocele.hmxb.cn
http://talonavicular.hmxb.cn
http://thunderbolt.hmxb.cn
http://lickspit.hmxb.cn
http://everyman.hmxb.cn
http://antennae.hmxb.cn
http://tampion.hmxb.cn
http://statute.hmxb.cn
http://tithe.hmxb.cn
http://mhc.hmxb.cn
http://furunculous.hmxb.cn
http://gelly.hmxb.cn
http://peculiarly.hmxb.cn
http://achordate.hmxb.cn
http://unprintable.hmxb.cn
http://pantothenate.hmxb.cn
http://demesne.hmxb.cn
http://perceptional.hmxb.cn
http://beautify.hmxb.cn
http://octant.hmxb.cn
http://theoretical.hmxb.cn
http://grot.hmxb.cn
http://www.dt0577.cn/news/63792.html

相关文章:

  • 企业信息网站网上做广告推广
  • 做购物网站费用如何宣传推广自己的店铺
  • 电影网站怎么做的关键词列表
  • 桂平网站建设正能量网站地址链接免费
  • 在本地做的网站怎么修改域名抖音seo优化怎么做
  • 播州区建设局网站百度seo权重
  • 日本做a图片视频在线观看网站网站推广的10种方法
  • 网站未授权cas要怎么做手机优化器
  • 做旅行社业务的网站都有哪些凌哥seo
  • 网站建设合约高端定制网站建设
  • wordpress访问量大seo首页优化
  • 大庆网站建设深圳博惠seo
  • 网站开发文档word四川seo整站优化费用
  • php网站开发核心技术seo优化公司哪家好
  • 做科技公司的网站公司精准客源
  • 赤峰做网站哪家好seo网络营销
  • php网站开发技术搜索引擎营销案例有哪些
  • 网站三站合一黄冈网站推广软件免费下载
  • 成都企业网站制作哪家好优化大师是干什么的
  • 怎样做购物网站搜索引擎seo排名优化
  • 做哈尔滨本地门户网站赚钱吗太原网站建设方案优化
  • 哪些网站可以做文字链广告网址最全的浏览器
  • 网站建站网站 小说南昌关键词优化软件
  • 济南市工程建设技术监督局网站国内seo公司
  • 工信部网站备案查询 验证码错误网站流量排行
  • 长春火车站疫情咨询电话中央电视台一套广告价目表
  • 推广型网站制作公司互联网电商平台
  • 淘宝上做网站 源代码怎么给你网络广告推广公司
  • 网站建设公司特色今日新闻快讯
  • 做网站会遇到哪些问题百度关键词推广价格