标签:display else turn int none span return mes class
#include<stdio.h> using namespace std; int main(){ int n; scanf("%d",&n); int b,nowb,subb,res=0; b=0; for(int i=0;i<n;i++){ scanf("%d",&nowb); subb = nowb - b; if(subb>0) res += subb*6 + 5; else res += (-subb)* 4 + 5; b = nowb; } printf("%d",res); return 0; }
标签:display else turn int none span return mes class
原文地址:https://www.cnblogs.com/Learn-Excel/p/13211137.html