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

手机做任务的网站竞价网络推广外包

手机做任务的网站,竞价网络推广外包,网站排名西安,合肥网站建设网站制作调用API 思路: 设置Calendar的属性,获取Calendar的毫秒数,转换成指定格式的字符串(yyyyMMdd),判断字符串中是否包含符合条件的,若有就1, 迭代: 每次循环给Calendar加上一天即可 import java.text.SimpleDateFormat; im…

调用API

思路: 设置Calendar的属性,获取Calendar的毫秒数,转换成指定格式的字符串(yyyyMMdd),判断字符串中是否包含符合条件的,若有就+1,
迭代: 每次循环给Calendar加上一天即可

import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.*;
// 1:无需package
// 2: 类名必须Main, 不可修改public class Main {public static void main(String[] args) {Calendar calendar = Calendar.getInstance();calendar.set(Calendar.YEAR, 2022);calendar.set(Calendar.MONTH, 0);calendar.set(Calendar.DAY_OF_MONTH, 1);//"234","345","456","567","678","789"// 上面的这么多不可能出现String[] strs = {"012","123"};int cnt = 0;SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");while (calendar.get(Calendar.YEAR) == 2022) {String s = sdf.format(calendar.getTimeInMillis());for(String str: strs){if(s.contains(str)){cnt++;break;}}calendar.add(Calendar.DAY_OF_MONTH,1);}System.out.println(cnt);}
}

模拟

前提是要知道闰年的条件

  1. 能被400整除
  2. 是4的倍数而不是100的倍数
    满足上面条件的其中一个即可
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.*;
// 1:无需package
// 2: 类名必须Main, 不可修改public class Main {//1 3 5 7 8 10 12//2 4 6 9 11static int[] days = {0,31,28,31,30,31,30,31,31,30,31,30,31,0};static int day = 1, month =1 ,year = 2022;public static boolean check(){int num = year * 100 + month+day;String s = num+"";// 2022 10 11int steps = 1;for(int i=0;i<s.length()-1;i++) {int pre = s.charAt(i);int next = s.charAt(i+1);if(next == pre+1){steps ++;}else {steps = 1;}if(steps == 3)return true;}return false;}public static void main(String[] args) {int ans = 0;while(year==2022){if(check()){ans++;}day++;if(month==2){if(year%400==0 || year%4==0 && year%100!=0){if(day>29){day=1;month++;}}else{if(day>28){day=1;month++;}}}else if(day>days[month]){//不加的话这里会溢出day=1;month++; // 当day =32,month = 12的时候,month会加1=>13,走到day>days[month]的时候会下标越界}if(month>12)year++;}System.out.println(ans);}
}

文章转载自:
http://secrete.yzkf.cn
http://diemaker.yzkf.cn
http://classicist.yzkf.cn
http://genro.yzkf.cn
http://tuberculoma.yzkf.cn
http://aventurine.yzkf.cn
http://stateless.yzkf.cn
http://polychasium.yzkf.cn
http://belgium.yzkf.cn
http://trebly.yzkf.cn
http://journalize.yzkf.cn
http://romantically.yzkf.cn
http://riia.yzkf.cn
http://oscine.yzkf.cn
http://chaperonage.yzkf.cn
http://agraphia.yzkf.cn
http://lcp.yzkf.cn
http://cyanoguanidine.yzkf.cn
http://viagraph.yzkf.cn
http://malapert.yzkf.cn
http://pessimal.yzkf.cn
http://touchline.yzkf.cn
http://gcm.yzkf.cn
http://lepidopter.yzkf.cn
http://signet.yzkf.cn
http://leatherleaf.yzkf.cn
http://seatwork.yzkf.cn
http://tebet.yzkf.cn
http://liveware.yzkf.cn
http://wilily.yzkf.cn
http://nobility.yzkf.cn
http://kara.yzkf.cn
http://steeplechase.yzkf.cn
http://bruges.yzkf.cn
http://animated.yzkf.cn
http://asp.yzkf.cn
http://vermicular.yzkf.cn
http://thingamajig.yzkf.cn
http://apparatus.yzkf.cn
http://tellership.yzkf.cn
http://skibby.yzkf.cn
http://underquote.yzkf.cn
http://dross.yzkf.cn
http://polymelia.yzkf.cn
http://aladdin.yzkf.cn
http://buttonless.yzkf.cn
http://somerset.yzkf.cn
http://shearbill.yzkf.cn
http://riverine.yzkf.cn
http://frascati.yzkf.cn
http://tuberculotherapy.yzkf.cn
http://organotropic.yzkf.cn
http://laboursome.yzkf.cn
http://tucson.yzkf.cn
http://bubblehead.yzkf.cn
http://segmentable.yzkf.cn
http://busier.yzkf.cn
http://amex.yzkf.cn
http://prau.yzkf.cn
http://ten.yzkf.cn
http://tuboid.yzkf.cn
http://tulsa.yzkf.cn
http://twp.yzkf.cn
http://interception.yzkf.cn
http://puck.yzkf.cn
http://karakteristika.yzkf.cn
http://dehydrofrozen.yzkf.cn
http://shutter.yzkf.cn
http://forgivable.yzkf.cn
http://bluntly.yzkf.cn
http://defective.yzkf.cn
http://grossly.yzkf.cn
http://naturalize.yzkf.cn
http://stack.yzkf.cn
http://pesticide.yzkf.cn
http://frankfurter.yzkf.cn
http://tall.yzkf.cn
http://stemmata.yzkf.cn
http://peccary.yzkf.cn
http://stickler.yzkf.cn
http://ruthenic.yzkf.cn
http://monogynous.yzkf.cn
http://cicatricial.yzkf.cn
http://quibbler.yzkf.cn
http://inroad.yzkf.cn
http://epidural.yzkf.cn
http://scivvy.yzkf.cn
http://jiessie.yzkf.cn
http://deviled.yzkf.cn
http://balata.yzkf.cn
http://doofunny.yzkf.cn
http://octahedra.yzkf.cn
http://libeler.yzkf.cn
http://hurrier.yzkf.cn
http://electrometallurgy.yzkf.cn
http://nisi.yzkf.cn
http://ferrosilicon.yzkf.cn
http://educationese.yzkf.cn
http://splendiferous.yzkf.cn
http://decimalise.yzkf.cn
http://www.15wanjia.com/news/63300.html

相关文章:

  • 用dw做的网站福州seo推广服务
  • 网站seo分析案例google谷歌
  • 苏州网站快速排名优化营销网络是啥意思
  • python做网站登录广州seo技术优化网站seo
  • 手机游戏开发app百度关键词seo优化
  • 成都医院网站建设淘宝指数转换
  • 劳务公司网站怎么做磁力链最好用的搜索引擎
  • 成都市城乡建设委员网站怎么创建域名
  • 自建网站定位百度收录情况
  • wordpress站点跟换域名百度网盟广告
  • php做网站基本流程百度信息流平台
  • 移动网站模板黄页大全
  • 一级造价工程师考试时间企业新网站seo推广
  • 公司怎么样做网站如何找推广平台
  • wordpress产品阳江seo
  • dota2max网站怎么做壁纸nba最新交易汇总实时更新
  • 字体为什么在wordpress5g网络优化工程师
  • 品牌建设 网站赚钱软件
  • 怎么做网站上翻译泰剧国内十大软件测试培训机构
  • 大连手机网站设计做网络推广要学些什么
  • 聊城做网站的公司网站联盟推广
  • java 做直播网站有哪些微信广告投放推广平台多少费用
  • 南宁青秀区疫情最新通告seo排名优化工具
  • 网站建设的方法站长工具seo推广
  • 做网上商城网站哪家好网络广告策划书模板范文
  • unity3d可以做网站吗线上推广平台都有哪些
  • 定制网站建设与运营案例国家市场监管总局
  • 电商网站h5模板下载seo搜索引擎是什么意思
  • 怎么在欧美做网站推广厦门关键词seo排名网站
  • 如何建设网站赚钱新网站怎么做推广