Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
577 | 张志鹏 | 编程求1+3+5+...+n | C++ | Accepted | 100 | 0 MS | 264 KB | 156 | 2019-09-21 10:55:17 |
#include<iostream> int main(){ int i=1,h=0; int a; scanf("%d",&a); while(i<=a){ h=h+i; i=i+2; } printf("%d",h); return 0; }