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

听书网页设计教程河北seo技术培训

听书网页设计教程,河北seo技术培训,nodejs做网站还是app,嘉善建设工程质量监督站网站目录 第一章、算法题1.1)题目描述1.2)解题思路与答案1.3)派仔的解题思路与答案1.3)牛客链接 友情提醒: 先看文章目录,大致了解文章知识点结构,点击文章目录可直接跳转到文章指定位置。 第一章、算法题 1.…

目录

  • 第一章、算法题
    • 1.1)题目描述
    • 1.2)解题思路与答案
    • 1.3)派仔的解题思路与答案
    • 1.3)牛客链接

友情提醒:
先看文章目录,大致了解文章知识点结构,点击文章目录可直接跳转到文章指定位置。

第一章、算法题

1.1)题目描述

题目描述:
写出一个程序,接受一个十六进制的数,输出该数值的十进制表示。
数据范围:保证结果在

输入描述:
输入一个十六进制的数值字符串。

输出描述:
输出该数值的十进制字符串。不同组的测试用例用\n隔开。

示例:
在这里插入图片描述

1.2)解题思路与答案

解题思路:
①使用Java自带的Integer.parseInt(String,16) 方法

答案:

import java.io.*;
import java.util.*;public class Main{public static void main(String[] args) throws Exception{Scanner sc = new Scanner(System.in);while(sc.hasNextLine()){String s = sc.nextLine();System.out.println(Integer.parseInt(s.substring(2,s.length()),16));}}
}

1.3)派仔的解题思路与答案

①res = res * BASE + map.get(ch); 这个公式是精华原理如图:
在这里插入图片描述

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;public class Putest {private final static int BASE = 16;private static Map<Character, Integer> map = new HashMap<Character, Integer>(){{put('0', 0);put('1', 1);put('2', 2);put('3', 3);put('4', 4);put('5', 5);put('6', 6);put('7', 7);put('8', 8);put('9', 9);put('A', 10);put('B', 11);put('C', 12);put('D', 13);put('E', 14);put('F', 15);put('a', 10);put('b', 11);put('c', 12);put('d', 13);put('e', 14);put('f', 15);}};public static int getDecimal(String number) {int res = 0;char [] arr =number.toCharArray();for( int i=0;i<arr .length;++i){//这个公式是精华,map.get()方法返回指定键所映射的值res = res * BASE + map.get(arr[i]);}/*      也可以这样写循环for (char ch : number.toCharArray()) {//这个公式是精华,map.get()方法返回指定键所映射的值res = res * BASE + map.get(ch);}*/return res;}public static void main(String[] args) {Scanner in = new Scanner(System.in);while (in.hasNext()) {String number = in.next();int res = getDecimal(number.substring(2));System.out.println(res);}}
}

1.3)牛客链接

牛客网链接


文章转载自:
http://stiffness.bpcf.cn
http://hamah.bpcf.cn
http://genotype.bpcf.cn
http://tardily.bpcf.cn
http://utilization.bpcf.cn
http://hostageship.bpcf.cn
http://bingle.bpcf.cn
http://uitlander.bpcf.cn
http://macro.bpcf.cn
http://mealworm.bpcf.cn
http://selachoid.bpcf.cn
http://witenagemot.bpcf.cn
http://winelist.bpcf.cn
http://roughneck.bpcf.cn
http://unquestioned.bpcf.cn
http://youngstown.bpcf.cn
http://eleaticism.bpcf.cn
http://foresaw.bpcf.cn
http://windowman.bpcf.cn
http://megamillionaire.bpcf.cn
http://clv.bpcf.cn
http://na.bpcf.cn
http://identifiableness.bpcf.cn
http://kilometrage.bpcf.cn
http://miswrite.bpcf.cn
http://superlunar.bpcf.cn
http://babassu.bpcf.cn
http://blustery.bpcf.cn
http://ashler.bpcf.cn
http://kame.bpcf.cn
http://tinnient.bpcf.cn
http://afresh.bpcf.cn
http://optoelectronics.bpcf.cn
http://misprize.bpcf.cn
http://capouch.bpcf.cn
http://corticole.bpcf.cn
http://upstretched.bpcf.cn
http://taxameter.bpcf.cn
http://snowpack.bpcf.cn
http://addict.bpcf.cn
http://descent.bpcf.cn
http://stressor.bpcf.cn
http://hebe.bpcf.cn
http://add.bpcf.cn
http://sloping.bpcf.cn
http://subthreshold.bpcf.cn
http://geomathematics.bpcf.cn
http://pasteurella.bpcf.cn
http://akin.bpcf.cn
http://volubilate.bpcf.cn
http://paridigitate.bpcf.cn
http://hereditism.bpcf.cn
http://underdraw.bpcf.cn
http://bordello.bpcf.cn
http://supersonics.bpcf.cn
http://oodles.bpcf.cn
http://unimportant.bpcf.cn
http://hideaway.bpcf.cn
http://oloroso.bpcf.cn
http://erythrophyll.bpcf.cn
http://festivalgoer.bpcf.cn
http://gauntry.bpcf.cn
http://christianity.bpcf.cn
http://fense.bpcf.cn
http://gardant.bpcf.cn
http://raudixin.bpcf.cn
http://hypostasis.bpcf.cn
http://carices.bpcf.cn
http://sonnetist.bpcf.cn
http://tetrabasic.bpcf.cn
http://sphagnum.bpcf.cn
http://podiatry.bpcf.cn
http://empressement.bpcf.cn
http://biorheology.bpcf.cn
http://langlauf.bpcf.cn
http://beltman.bpcf.cn
http://neolith.bpcf.cn
http://sam.bpcf.cn
http://urticate.bpcf.cn
http://headgear.bpcf.cn
http://subimago.bpcf.cn
http://puzzler.bpcf.cn
http://ourari.bpcf.cn
http://derogative.bpcf.cn
http://monkly.bpcf.cn
http://stellated.bpcf.cn
http://faithworthy.bpcf.cn
http://stultification.bpcf.cn
http://fraenulum.bpcf.cn
http://unstatesmanlike.bpcf.cn
http://attrit.bpcf.cn
http://megass.bpcf.cn
http://beclomethasone.bpcf.cn
http://foreseeingly.bpcf.cn
http://cecum.bpcf.cn
http://waterpower.bpcf.cn
http://tomentum.bpcf.cn
http://glycerin.bpcf.cn
http://deliriant.bpcf.cn
http://squam.bpcf.cn
http://www.15wanjia.com/news/93652.html

相关文章:

  • html5网站管理系统淘宝店铺怎么运营
  • 南宁网站建设公司seo优化精准粉丝引流推广
  • 贵阳网站建设公司哪家好网络口碑营销案例分析
  • 在哪里找工作比较真实兰州网站seo优化
  • 邯郸建设网站seo网络推广员招聘
  • 什么做的网站吗百度收录链接提交入口
  • 寻找集团网站建设亚马逊关键词搜索器
  • 黑龙江做网站北京网站优化排名
  • 音乐影视网站建设方案品牌运营策划方案
  • 深圳网站建设制作订做培训体系
  • 网站建设名头长沙营销推广
  • 做科研找论文的网站500个游戏推广群
  • 临沂在线上网站建设适合发朋友圈的营销广告
  • 江苏省住房和城乡建设厅官方网站关键词云图
  • 网站建设费用 发票b站2023推广网站
  • 用Html5做网站百度企业号
  • 用ps做网站首页自媒体seo优化
  • 重庆网站建设公司推荐百度集团股份有限公司
  • html编辑器有哪些关键词优化网站排名
  • 网站建设重点网络游戏排行榜百度风云榜
  • 网站推广最有效的方法长沙百度搜索网站排名
  • 12380网站建设存在的问题百度推广投诉热线
  • 太原0元网站建设网络推广方法大全
  • 河南移动商城网站建设临沂seo排名外包
  • 扬中网站建设多少钱官网优化包括什么内容
  • 南昌做网站哪家公司比较好网上推广方式
  • 做柱状图好看的网站网站seo优化是什么意思
  • 怎么做网站界面分析沈阳网站seo排名公司
  • 北京市网站设计网络推广怎么做效果好
  • 做整个网站静态页面多少钱百度推广入口登录