当前位置:网站首页>Original title of Blue Bridge Cup
Original title of Blue Bridge Cup
2022-07-28 03:11:00 【A collection of old dreams 186】
Catalog
The first question is : Time to show
test questions C: Brush question Statistics
Topic 1 :
The first question is : Time to show
answer :
#include<stdio.h> int main() { long long int n = 0; scanf("%lld", &n); long long int time = 0; time = n % (24 * 60 * 60 * 1000); int HH = time /( 60 * 1000 * 60); time = time % (60 * 1000 * 60); int MM = time / (60 * 1000); time = time % (60 * 1000); int SS = time / 1000; printf("%02d:%02d:%02d", HH, MM, SS); return 0; }
The second question is :
test questions A: Nine to ten
The total score of this question :5 branch
【 Problem description 】
Hexadecimal positive integer ( 2022 ) 9 (2022)_9(2022)
9
How much is it converted to decimal ?
(2022)9=2∗93+2∗91+2∗90=1478
Third question :
test questions B: Shunzi date
The total score of this question :5 branch
【 Problem description 】
Xiao Ming likes shunzi very much . Shunzi refers to three consecutive numbers :123、456 etc. . Shunzi date refers to the date on the yyyymmdd In representation , There are any three consecutive digits that are a shunzi date . for example 20220123 It's a shunzi date , Because it has a shunzi :123; and 20221023 Is not a shunzi date , It doesn't have a straight son . Xiao Ming wants to know in the whole 2022 In the middle of the year , How many shunzi dates are there altogether .
analysis :
This question tests the ability of reasoning . Since the year has been determined , So just judge 2022mmdd Whether shunzi contains .
mm Yes 12 Species value , namely 01~12. Only 01、11 and 12, There is no chance of a surplus in other months .
about 2022-01-dd, Only 2022-01-23 eligible
about 2022-11-dd, Only 2022-11-23 eligible
about 2022-12-dd, Only 2022-12-30 and 2022-12-31 eligible
answer :
So the answer is :4
test questions C: Brush question Statistics
The time limit :1.0s Memory limit :256.0MB The total score of this question :10 branch
【 Problem description 】
Xiao Ming decided to brush the questions and prepare for the Blue Bridge Cup competition from next Monday . He plans to do... Every day from Monday to Friday a questions , Do... Every day on Saturdays and Sundays b questions . Please help Xiao Ming calculate , According to the plan, he will realize that the number of questions is greater than or equal to n topic ?
【 Input format 】
The input line contains three integers a,b and n.
#include<stdio.h> int main() { int a=0, b=0, n=0; scanf("%d %d %d", &a, &b, &n); int sum = 0; int i = 1; int c = 0; while (sum < n) { if (i % 7 == 0) { sum = sum +b; } else if ((i + 1) % 7 == 0) { sum = sum + b; } else { sum = sum + a; } i++; } printf("%d", i-1); return 0;
边栏推荐
- Web服务器
- 【stream】并行流与顺序流
- CNN training cycle reconstruction - hyperparametric test | pytorch series (XXVIII)
- Job 7.27 IO process
- Pytorch 相关-梯度回传
- 汇总了50多场面试,4-6月面经笔记和详解(含核心考点及6家大厂)
- Why is it that when logging in, you clearly use the account information already in the database, but still display "user does not exist"?
- Explanation of CNN circular training | pytorch series (XXII)
- app 自动化 环境搭建(一)
- Niuke-top101-bm340
猜你喜欢

Es6.--promise, task queue and event cycle

JVM 内存布局详解,图文并茂,写得太好了!

CAD创建组却没有组合在一起?

别再用 offset 和 limit 分页了,性能太差!

意外收获史诗级分布式资源,从基础到进阶都干货满满,大佬就是强!
![[stream] parallel stream and sequential stream](/img/e1/b8728962c14df56241aa6973c0c706.png)
[stream] parallel stream and sequential stream

CNN中的混淆矩阵 | PyTorch系列(二十三)
![Trivy [1] tool scanning application](/img/b1/c05949f9379fcde658da64f3a0157a.png)
Trivy [1] tool scanning application

基于JSP&Servlet实现的众筹平台系统

What "posture" does JD cloud have to promote industrial digitalization to climb to a "new level"?
随机推荐
trivy【1】工具扫描运用
Kubernetes-----介绍
R 笔记 MICE
RTSP/Onvif协议EasyNVR视频平台一键升级方案的开发设计逻辑
会议OA项目之我的审批&&签字功能
CNN循环训练的解释 | PyTorch系列(二十二)
Introduction to the reduce() function in JS
智能工业设计软件公司天洑C轮数亿元融资
Explanation of CNN circular training | pytorch series (XXII)
els 键盘信息
图像去噪综合比较研究
Stop paging with offset and limit. The performance is too poor!
Data Lake: each module component
使用PyTorch的TensorBoard-可视化深度学习指标 | PyTorch系列(二十五)
GAMES101复习:光线追踪(Ray Tracing)
Note that these regions cannot take the NPDP exam in July
43.js -- scope chain
行业洞察 | 语音识别真的超过人耳朵了吗?
app 自动化 环境搭建(一)
The test post changes jobs repeatedly, jumping and jumping, and then it disappears


