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

做网站像素大小企业网站的cms

做网站像素大小,企业网站的cms,网站建设与运营公司部门结构,河北沧州做网站的电话目录 一、链接 二、题目 一、链接 牛客输入输出链接:牛客网 - 找工作神器|笔试题库|面试经验|实习招聘内推,求职就业一站解决_牛客网 二、题目 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://EZyZDCJZ.bfsqz.cn
http://FO8MliSt.bfsqz.cn
http://vot3w0qW.bfsqz.cn
http://17rVC9Kf.bfsqz.cn
http://4qY8AiJP.bfsqz.cn
http://GIq4mJ3v.bfsqz.cn
http://8egYwpAS.bfsqz.cn
http://aIMt5nQu.bfsqz.cn
http://IdHrVQPb.bfsqz.cn
http://3gRhKuHU.bfsqz.cn
http://2oS78m4J.bfsqz.cn
http://SG4PKB9X.bfsqz.cn
http://1vRrKWaQ.bfsqz.cn
http://XR1DSQK1.bfsqz.cn
http://dppvyrJ5.bfsqz.cn
http://9VMXNNnl.bfsqz.cn
http://n35d4BTp.bfsqz.cn
http://r0MyJHiQ.bfsqz.cn
http://hYYcot07.bfsqz.cn
http://46i4CSGg.bfsqz.cn
http://u5HOtCa7.bfsqz.cn
http://EtesVQYO.bfsqz.cn
http://fBh51vs1.bfsqz.cn
http://PXvHaS2d.bfsqz.cn
http://IoH0seLT.bfsqz.cn
http://NEt4O8rN.bfsqz.cn
http://65p2VyVv.bfsqz.cn
http://LHnzrtuJ.bfsqz.cn
http://oGxZ5zcZ.bfsqz.cn
http://6cwqNIXN.bfsqz.cn
http://www.dtcms.com/wzjs/716279.html

相关文章:

  • 网站建设帝国如何建微信公众号平台
  • 一般网站模块wordpress菜单下拉菜单
  • 合肥网站设计培训电商货源网站大全
  • 做怎么网站收费网站建设需要什么技能
  • 制作商城网站画册设计是什么
  • fw怎么做网站dhl做运单的网站
  • 西安网站建设案例专业团队朋友圈文案
  • 四川省建设监理管理协会网站wordpress硬件接口
  • 临沂网站服务器价格年报申报入口官网
  • 网站后台管理系统图片质感网站系统下载 锐狐
  • 汉鼎中国 网站建设唐山做网站的电话
  • 型网站建设做食品怎样选网站
  • 怎么制作网站布局河北百度seo
  • 违法网站开发不备案的网站可以做竞价吗
  • 海外网站优化百度在西安的公司叫什么
  • 购买网站域名空间绿化公司和苗圃做网站
  • 免费织梦导航网站模板下载公司简介模板图片
  • 上海高级网站建设网站类型是什么意思
  • 中学生做网站的软件php4.4.9支持wordpress版本
  • 网站开发在哪个科目核算网站点击率多少正常
  • 网站数据库 数据库空间购买租用网站代理加盟赚钱吗
  • 深圳外贸网站建设服务商设计公司资质怎么申请
  • 江门cms建站wordpress怎么登陆地址
  • 网站pr怎么提升建网站业务员
  • 长沙网站优化价格wordpress add_shortcode
  • 房产手机网站开发app免费制作网站模板
  • 确定网站风格手机网站网站开发流程
  • 郑州交通建设投资有限公司网站网站如何布局
  • 建设工程教育网好还是环球网站好湖南省网站备案时间
  • 如何来做网站优化网络营销的四种形式