当前位置:网站首页>刷题-洛谷-P1046 陶陶摘苹果
刷题-洛谷-P1046 陶陶摘苹果
2022-07-25 13:32:00 【宋向上_UP】
P1046 陶陶摘苹果-C语言
1、题目

2、解题过程
结果:Accepted
//洛谷2 p1046 陶陶摘苹果
#include <stdio.h>
#define BENCH 30 //板凳高度30厘米
int main()
{
int apple[10];//10个苹果高度
int arm;//陶陶臂长
int counter=0;//计数器
int height;//总高度
int i;
for (i = 0; i < 10; i++) {
scanf("%d", &apple[i]);//输入苹果高度
}
scanf("%d", &arm);//输入臂长
height = arm + BENCH;
for (i = 0; i < 10; i++) {
if (apple[i] <= height) {
counter++;
}
}
printf("%d", counter);
return 0;
}
边栏推荐
- Design and principle of thread pool
- 0710RHCSA
- 【GCN-CTR】DC-GNN: Decoupled GNN for Improving and Accelerating Large-Scale E-commerce Retrieval WWW22
- 一味地做大元宇宙的规模,已经背离了元宇宙本该有的发展逻辑
- 嵌入式代码如何进行重构?
- hcip第十天笔记
- mujoco_ Py Chinese document
- 我的创作纪念日
- Mu Changchun, data Research Institute of the central bank: controllable anonymity of digital RMB is an objective need to safeguard public interests and financial security
- [Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing
猜你喜欢

How to solve the problem of taking up too much space when recording and editing videos?

【GCN】《Adaptive Propagation Graph Convolutional Network》(TNNLS 2020)
![[ai4code final chapter] alphacode: competition level code generation with alphacode (deepmind)](/img/05/86eed30a7c063beace400a005e4a4c.png)
[ai4code final chapter] alphacode: competition level code generation with alphacode (deepmind)

为提高效率使用ParallelStream竟出现各种问题

Convolutional neural network model -- alexnet network structure and code implementation

0710RHCSA

从输入网址到网页显示

Uncaught SyntaxError: Octal literals are not allowed in strict mode.

Generate SQL script file by initializing the latest warehousing time of vehicle attributes

Brpc source code analysis (III) -- the mechanism of requesting other servers and writing data to sockets
随机推荐
【AI4Code】《IntelliCode Compose: Code Generation using Transformer》 ESEC/FSE 2020
C # basic learning (XXIII)_ Forms and events
MLIR原理与应用技术杂谈
ESP32-C3 基于Arduino框架下Blinker点灯控制10路开关或继电器组
0717RHCSA
Online Learning and Pricing with Reusable Resources: Linear Bandits with Sub-Exponential Rewards: Li
基于百问网IMX6ULL_PRO开发板驱动AP3216实验
hcip第十天笔记
【AI4Code】CodeX:《Evaluating Large Language Models Trained on Code》(OpenAI)
Gym安装、调用以及注册
嵌入式代码如何进行重构?
6W+字记录实验全过程 | 探索Alluxio经济化数据存储策略
Hcip eighth day experiment
Detailed explanation of the training and prediction process of deep learning [taking lenet model and cifar10 data set as examples]
Based on Baiwen imx6ull_ Pro development board transplants LCD multi touch driver (gt911)
Hcip day 9 notes
详解浮点数的精度问题
Esp32-c3 is based on blinker lighting control 10 way switch or relay group under Arduino framework
并发编程之阻塞队列
【GCN-RS】Learning Explicit User Interest Boundary for Recommendation (WWW‘22)