计算:1+11+21+…+31+...n
#include<iostream> using namespace std; int main() { int n,s= 0; cin >> n; for(int i=1;i <=n;i=i+10){ s=s+i; } cout <<s; return 0; }
2011
203212