杭电oj 1096 A+B for Input-Output Practice (VIII)
2016-07-26 10:14
429 查看
水题,注意输出就好了
ac代码
#include <stdio.h>#include <stdlib.h>int main(){int N,M,n,i,j,sum=0;scanf("%d",&N);if(N!=0){int a[100];for(j=0;j<N;j++){scanf("%d",&M);for(i=1;i<=M;i++){scanf("%d",&n);sum=sum+n;}a[j]=sum;sum=0;}for(j=0;j<N;j++){printf("%d\n",a[j]);if(j>N-2)continue;printf("\n");}}return 0;}
相关文章推荐
- TP开发小技巧
- 利用路由修改thinkphp框架开发的后台地址
- 深入理解PHP传参原理(PHP5.2)
- PHP 读取/导出 CSV文件
- STP RSTP
- implemented loader.php
- YII2数据库依赖缓存
- yii2中的全局工具函数
- yii2的事务处理
- With PHP frameworks, why is the “route” concept used?
- php 读取输出其他文件的实现方法
- PHP进阶(二)——类与对象
- php实现贪吃蛇小游戏
- php学习笔记(四)插入内容
- php 友好时间转换方法
- yiii2安装smarty
- ThinkSNS中判断访问请求请求来源是否为手机的方法
- PHP编程时的规范化命名
- [李景山php]每天laravel-20160927|Factory.php
- [李景山php]每天laravel-20160927|Factory.php