当前位置:网站首页>C竞赛训练
C竞赛训练
2022-08-02 05:08:00 【mazhilin】
# include<stdio,h>int main (){int m,n,j,x,y; while(1) { scanf ("%d",&n); if (n==0) return ; j=0; x=0; for(m=0;m<n;m++) { scanf ("%d",&y); if (x<y) j+=(y-x)*6+5; else j+=(x-y)*4+5; x=y; } printf("%d\n",j); } return ;}
边栏推荐
猜你喜欢
51单片机外设篇:ADC
复盘:图像饱和度计算公式和图像信噪(PSNR)比计算公式
c语言:查漏补缺(三)
浏览器的onload事件
网安学习-内网渗透4
coredns介绍
Redis-cluster mode (master-slave replication mode, sentinel mode, clustering mode)
ApiPost is really fragrant and powerful, it's time to throw away Postman and Swagger
Detailed explanation of AMQP protocol
[C language] LeetCode26. Delete duplicates in an ordered array && LeetCode88. Merge two ordered arrays
随机推荐
H5如何实现唤起APP
JUC(二)原子类:CAS、乐观锁、Unsafe和原子类
[C language] LeetCode26. Delete duplicates in an ordered array && LeetCode88. Merge two ordered arrays
公司不重视软件测试,新来的阿里P8给我们撰写了测试用例编写规范
PSQL function, predicate, CASE expression and set operations
leetcode 204. Count Primes 计数质数 (Easy)
Block elements, inline elements (
elements, span elements)H5接入支付流程-微信支付&支付宝支付
100 latest software testing interview questions in 2022, summary of common interview questions and answers
LeetCode brush topic series - 787 K station transfer within the cheapest flight
51单片机外设篇:红外通信
Matlab论文插图绘制模板第41期—气泡图(bubblechart)
kubernetes 亲和、反亲和、污点、容忍
Mycat2.0搭建教程
Go语学习笔记 - grpc serverclient protobuf 从零开始Go语言
测试环境要多少?从成本与效率说起
Matlab paper illustration drawing template No. 41 - bubble chart (bubblechart)
Google Chrome(谷歌浏览器)安装使用
navicat新建数据库
自动化运维工具——ansible、概述、安装、模块介绍