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

怎么联系网站开发团队如何在百度上打广告

怎么联系网站开发团队,如何在百度上打广告,长春企业网站排名优化,电子商务网站建设分析论文【手拍手计算次数和总数】游戏规则:左手和右手拍球初始数为0,首先左手第一次拍球数1下,右手拍球1下,接下来左手在拍球时是上一次左手上一次右手的总和,右手也是上一次左手上一次右手拍球的总和,最后拍球总数…

【手拍手计算次数和总数】游戏规则:左手和右手拍球初始数为0,首先左手第一次拍球数1下,右手拍球1下,接下来左手在拍球时是上一次左手+上一次右手的总和,右手也是上一次左手+上一次右手拍球的总和,最后拍球总数必须等于输入的拍球总和,并按规定输出。

现给定一个拍球总数,和最后输出时要打印的哪只手拍过的所有次数。每超过10 个元素,请换行输出。

输入描述:

输入为一行,拍球总数+最后打印某只手拍球的所有数量,1<= 拍球总数<=5000

输出描述:

某只手的拍的次数+某只手的拍球的所有数量

 实例1:                                                                                                                                             

输入:

150,left hand

输出:

now is 11 times by left hand 
1 2 5 13 34 7

 实例2:                                                                                                                                             

输入:

100,right hand

输出:

now is 10 times by right hand 
1 3 8 21 12

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.junit.jupiter.api.Test;import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;public class testOk {@Testpublic static void main(String[] args) {Scanner in = new Scanner(System.in);String s = in.nextLine();String[] split = s.split(",");// 计算Integer arriveCount = Integer.parseInt(split[0]);Integer countPaiJi = 0;Integer leftActualCount = 0;Integer rightActualCount = 0;Integer actualSumCount = 0;ArrayList<Integer> leftList = new ArrayList<>();ArrayList<Integer> rightList = new ArrayList<>();while (arriveCount.compareTo(actualSumCount) != 0) {countPaiJi = countPaiJi + 1;Integer cuurentCount = (leftActualCount + rightActualCount) - 0 == 0 ? 1 : (leftActualCount + rightActualCount);Integer virSumCount = actualSumCount + cuurentCount;if (virSumCount > arriveCount) {cuurentCount = arriveCount - actualSumCount;}if (countPaiJi % 2 == 0) {rightActualCount = cuurentCount;rightList.add(cuurentCount);} else {leftActualCount = cuurentCount;leftList.add(cuurentCount);}actualSumCount = actualSumCount + cuurentCount;}// 输出String beforeMsgString = "now is ";String endMsgString;ArrayList<Integer> responseList;if (split[1].contains("left")) {responseList = leftList;endMsgString = " times by left hand ";} else {responseList = rightList;endMsgString = " times by right hand ";}List<List<Integer>> partitionList = ListUtils.partition(responseList, 10);System.out.println(beforeMsgString + countPaiJi + endMsgString);if (CollectionUtils.isEmpty(partitionList)) {System.out.println("0");}for (List<Integer> integers : partitionList) {String collect = integers.stream().map(String::valueOf).collect(Collectors.joining(" "));System.out.println(collect);}}}

http://www.ds6.com.cn/news/55007.html

相关文章:

  • 心理咨询网站php后台一般需要哪些模块湖北网络推广
  • 网站建设体质喝什么茶网页设计规范
  • 深圳做积分商城网站公司如何制作一个个人网站
  • 固安网站建设如何广告推广
  • 济南做网站比较好的公司网络推广视频
  • b站推广网站入口2022的推广形式实时军事热点
  • 平台投放广告怎么收费seo顾问服务
  • 烟台网站推广广州公司市场调研与分析
  • wordpress表单统计插件下载网络营销优化推广
  • 餐饮网站建设推广青岛百度推广优化怎么做的
  • 云南红舰工贸有限公司的网站建设各大网站提交入口
  • 麻涌镇网站仿做2022黄页全国各行业
  • 数据机房建设公司广州市口碑seo推广
  • 沧州网站建设培训网站权重排名
  • 宣传画册设计沈阳seo建站
  • 苏州 做网站windows优化大师会员兑换码
  • 站长之家新网址精准信息预测
  • 如何在网站中做内部链接搜索引擎排名大全
  • b站推广入口在哪百度手机助手应用商店下载
  • 网站开发的形式有哪些seo网站排名查询
  • 衡阳网站定制奉化seo页面优化外包
  • wordpress 培训aso优化服务
  • 玉泉营网站建设搜索引擎有哪些软件
  • 艺术学校示范校建设专题网站吴中seo页面优化推广
  • 网站加在线qqnba哈登最新消息
  • 怎么做网站板块什么是网店推广
  • 做招聘求职网站今日重点新闻
  • 乌鲁木齐网站设计杭州谷歌推广
  • 食品网站应该怎么做企业网络营销案例分析
  • 怎么做微信上的网站沪深300指数基金