浙江理工大学的宝石

http://oj.acm.zstu.edu.cn/JudgeOnline/problem.php?id=4387 

题解:签到题

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
 
int main(int argc, char *argv[]) {
    int n,i,temp,sum=0;
    scanf("%d",&n);
    for(i=1;i<=n;i++){ 
        scanf("%d",&temp);
        sum+=temp; 
    }
    printf("%d\n",sum); 
    return 0;
}

 

全部评论

相关推荐

07-24 16:39
已编辑
门头沟学院 测试开发
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务