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

油漆企业网站要怎么做成都网站建设与开发

油漆企业网站要怎么做,成都网站建设与开发,大学生做兼职上什么网站好,做网站需要买服务器吗目录 一、链接 二、题目 一、链接 牛客输入输出链接:牛客网 - 找工作神器|笔试题库|面试经验|实习招聘内推,求职就业一站解决_牛客网 二、题目 1.只有输出 public class Main {public static void main(String[] args) {System.out.println("H…

目录

一、链接

二、题目


一、链接

牛客输入输出链接:牛客网 - 找工作神器|笔试题库|面试经验|实习招聘内推,求职就业一站解决_牛客网

二、题目

1.只有输出

public class Main {public static void main(String[] args) {System.out.println("Hello Nowcoder!");}
}

2.给定两个整数 a 和 b ,请你求出 a+b 的值。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);while(in.hasNextInt()){int a = in.nextInt();int b = in.nextInt();System.out.println(a+b);}}
}

3.给定若干组测试数据,读取至文件末尾为止。
每组数据有两个整数 a 和 b ,请你求出 a+b 的值。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextInt()) { // 注意 while 处理多个 caseint a = in.nextInt();int b = in.nextInt();System.out.println(a + b);}}
}

4.给定 t 组测试数据。

每组数据有两个整数 a 和 b ,请你求出 a+b 的值。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextInt()) { // 注意 while 处理多个 caseint n=in.nextInt();for(int i=0;i<n;i++){int a = in.nextInt();int b = in.nextInt();System.out.println(a + b);}}}
}

5.给定若干组测试数据,最后一组数据为 0  0 ,作为输入的结尾。

每组数据有两个整数 a 和 b ,请你求出 a+b 的值。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextInt()) { // 注意 while 处理多个 caseint a = in.nextInt();int b = in.nextInt();// 跳出本次循环if(a==0 && b==0){continue;}System.out.println(a + b);}}
}

6.给定一个长度为 n 的正整数数组 a ,第 i 个元素的值为 ai 。
请你求出数组元素之和。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextInt()) { // 注意 while 处理多个 caseint n = in.nextInt();int[] arr = new int[n];long sum = 0;for(int i=0;i<n;i++){sum += in.nextInt();}System.out.println(sum);}}
}

7.给定 tt 组询问,每次询问给出一个长度为 nn 的正整数数组 aa ,第 ii 个元素的值为 aiai​ 。
请你分别求出每个数组的元素之和。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextInt()) { // 注意 while 处理多个 caseint t = in.nextInt();for(int i=0;i<t;i++){int n = in.nextInt();long sum = 0;for(int j=0;j<n;j++){sum += in.nextInt();}System.out.println(sum);}}}
}

8.给定一个 nn 行 mm 列的二维正整数数组 aa ,第 ii 行第 jj 列元素的值为 ai,jai,j​ 。
请你求出数组元素之和。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextInt()) { // 注意 while 处理多个 caseint n = in.nextInt();int m = in.nextInt();int[][] arr = new int[n][m];long sum = 0;for(int i=0;i<n;i++){for(int j=0;j<m;j++){arr[i][j] = in.nextInt();sum+=arr[i][j];}}System.out.println(sum);}}
}

9.给定 tt 组询问,每次询问给出一个 nn 行 mm 列的二维正整数数组 aa ,第 ii 行第 jj 列元素的值为 ai,jai,j​ 。
请你分别求出每个数组的元素之和。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextInt()) { // 注意 while 处理多个 caseint t = in.nextInt();for (int k = 0; k < t; k++) {int n = in.nextInt();int m = in.nextInt();int[][] arr = new int[n][m];long sum = 0;for (int i = 0; i < n; i++) {for (int j = 0; j < m; j++) {arr[i][j] = in.nextInt();sum += arr[i][j];}}System.out.println(sum);}}}
}

10.给定一个长度为 nn 的字符串 ss ,请你将其倒置,然后输出。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNext()) { // 注意 while 处理多个 caseint n = in.nextInt();String str = in.next();StringBuilder sb = new StringBuilder(str);str = sb.reverse().toString();System.out.println(str);}}
}

11.给定 tt 组询问,每次给出一个长度为 nn 的字符串 ss ,请你将其倒置,然后输出。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNext()) { // 注意 while 处理多个 caseint t = in.nextInt();for (int i = 0; i < t; i++) {int n = in.nextInt();String str = in.next();StringBuilder sb = new StringBuilder(str);str = sb.reverse().toString();System.out.println(str);}}}
}

12.给定一个 nn 行 mm 列的二维字符数组 aa ,第 ii 行第 jj 列元素的值为 ai,jai,j​ 。
请你对行和列都倒置,然后输出之。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNext()) { // 注意 while 处理多个 caseint n = in.nextInt();int m = in.nextInt();String[] strr = new String[n];for(int i=0;i<n;i++){String str = in.next();StringBuilder sb = new StringBuilder(str);str = sb.reverse().toString();strr[i] = str;}     for(int j=strr.length-1;j>=0;j--){System.out.println(strr[j]);}}}
}

13.给定 tt 组询问,每次给出一个长度为 nn 的带空格的字符串 ss ,请你去掉空格之后,将其倒置,然后输出。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNext()) { // 注意 while 处理多个 caseint t = in.nextInt();for(int i=0;i<t;i++){int n = in.nextInt();in.nextLine();String str = in.nextLine();//  将空格替换成无nullstr = str.replaceAll(" ", "");  System.out.println(new StringBuilder(str).reverse().toString());  }}}
}

14.给定一个小数 nn ,请你保留 33 位小数后输出。
如果原来的小数位数少于 33 ,需要补充 00 。
如果原来的小数位数多于 33 ,需要四舍五入到 33 位。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNext()) { // 注意 while 处理多个 casedouble i = in.nextDouble();System.out.println(String.format("%.3f",i));}}
}

15.给定一个正整数 nn ,请你保留 99 个数位,然后输出。
如果数位少于 99 个,那么需要补充前导零。

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextInt()) { // 注意 while 处理多个 caseint a = in.nextInt();int count = 0;int t = a;while(t>0){count++;t = t/10;}if(count==9){System.out.println(a);}if(count<9){int diff = 9-count;for(int i=0;i<diff;i++){System.out.print("0");}System.out.println(a);}}}
}

16.spj判断YES与NO

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextInt()) { // 注意 while 处理多个 caseint a = in.nextInt();if(a%2==0){System.out.println("no");}else{System.out.println("Yes");}}}
}

17.spj判断浮点误差

public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextInt()) { // 注意 while 处理多个 caseint a = in.nextInt();double s = 3.14 * a *a;System.out.print(s);}}
}


文章转载自:

http://xGpL41Jk.pxLsh.cn
http://3CxxxYg5.pxLsh.cn
http://gmwPaZGY.pxLsh.cn
http://ygjx2kQY.pxLsh.cn
http://hJs2QBWd.pxLsh.cn
http://SAUCpiT6.pxLsh.cn
http://BleEAhPx.pxLsh.cn
http://C13To9U9.pxLsh.cn
http://UksN9mSu.pxLsh.cn
http://wkoYBv6B.pxLsh.cn
http://30JwxXFZ.pxLsh.cn
http://NpHwBxAi.pxLsh.cn
http://GXo0qvDZ.pxLsh.cn
http://MPAXOocF.pxLsh.cn
http://ZJAuHcTb.pxLsh.cn
http://xcRIEVKc.pxLsh.cn
http://LVdDyJXu.pxLsh.cn
http://OSS8S3aE.pxLsh.cn
http://tYlmoSBn.pxLsh.cn
http://bR1Un9kS.pxLsh.cn
http://tFx8DeE6.pxLsh.cn
http://ckGKWdBt.pxLsh.cn
http://OfwezHL6.pxLsh.cn
http://5swsrIUP.pxLsh.cn
http://VogKI8gV.pxLsh.cn
http://rsTf8lhG.pxLsh.cn
http://MhnbSb06.pxLsh.cn
http://ZMCEfMgt.pxLsh.cn
http://BiP3ZNqQ.pxLsh.cn
http://rZWuYF29.pxLsh.cn
http://www.dtcms.com/wzjs/736029.html

相关文章:

  • 重庆城市建设档案馆网站虚拟主机的概念和功能
  • 服务好的丹阳网站建设建设美食网站的作用
  • 广州高端网站设计erp系统的优点
  • 网上有兼职做数据网站社区网站制作
  • 厦门免费自助建站模板wordpress七牛远程图片
  • 永久免费域名注册网站住房城乡建设网站查询
  • 个人或主题网站建设 实验体会网站制作软件排名
  • 校园网站建设培训的心得体会计算机网站开发就业形势
  • 货运公司网站源码seo网站排名优化服务
  • 广州网站维护公司网站制作方案
  • 维持一个素材网站要多少钱广州网站开发企业
  • 成都网络推广网站seo工具有哪些
  • 网站建设哪家好建议兴田德润怎样做自己的 优惠卷网站
  • 做网站的小图标自己做的网站百度搜不到
  • 兰州网站建设公司做标记网站
  • 佛山做外贸网站的公司吗网站设计策划书案例
  • 怎样用ps做网站网络程序员
  • 石家庄网站建设选汉狮权威发布意思
  • 惠州做网站优化米定制网的网站是那个公司做
  • 网站的主要功能网站建设怎么管理业务员
  • 网站里的专题页面每天试用三小时vp加速器
  • 个人网站做项目高级网站开发培训价格
  • 商丘购物网站开发设计六安网吧什么时候解封
  • 北京时间网站建设别人用我公司权限做网站
  • 深圳网站建设中为广告设计需要什么软件
  • 做网站的销售能干什么做号网站
  • 做百度网站费用多少网页设计基础填空题及答案
  • 网站app制作费用单成都网站设计平台
  • 常州网站建设公司排名discuz wordpress主题
  • 网站自己做服务器划算吗腾讯云 网站备案