浙大PAT甲级-1008
来源:互联网 发布:什么软件可以做代理 编辑:程序博客网 时间:2024/05/22 01:47
小学生算术题
#include <iostream>using namespace std;int main(){ int n, i, time=0; int a=0, b; cin>>n; i=n; while(i--){ cin>>b; if(b>a){ time+=(b-a)*6; }else if(b<a){ time+=(a-b)*4; } a=b; } time+=n*5; cout<<time<<endl; return 0;}
阅读全文
0 0
- 浙大PAT甲级-1008
- 浙大pat甲级 1023
- 浙大pat甲级 1024
- 浙大pat甲级 1025
- 浙大PAT甲级 1026
- 浙大PAT甲级 1028
- 浙大PAT甲级 1029
- 浙大PAT甲级 1030
- 浙大PAT甲级 1031
- 浙大PAT甲级 1032
- 浙大PAT甲级 1033
- 浙大PAT甲级 1035
- 浙大PAT甲级 1037
- 浙大PAT甲级 1039
- 浙大PAT甲级 1040
- 浙大PAT甲级 1038
- 浙大PAT甲级 1041
- 浙大PAT甲级 1042
- coso js 魔窗
- Java中Class类详解、用法及泛化
- redis的java调用
- DataBinding使用教程(一):配置与基本使用
- linux卸载openjdk以及安装正常版本jdk
- 浙大PAT甲级-1008
- Machine Learning----Regression(2)
- haproxy.cfg配置详解
- Android中的事件分发(上)
- 文件上传与下载
- 关于解决工程编译出现Undefined symbol __use_two_region_memory 和Undefined symbol __initial_sp的问题
- Spring初始化
- CRC循环冗余码
- 【Linux】进程间的关系以及终端的概念