uva488
来源:互联网 发布:2017数据录入员工资 编辑:程序博客网 时间:2024/06/05 15:53
#include<cstdio>
#include<cstring>
#include<iostream>
#include<cctype>
#include<string>
#include<cstdlib>
#include<vector>
using namespace std;
int main(){
#ifdef LOCAL
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
#endif
int t, a, b;
while(scanf("%d", &t) != EOF){
while(t--){
scanf("%d%d", &a, &b);
for(int ii = 1; ii <= b; ii++){
for(int i = 1; i <= a; i++){
for(int j = 1; j <= i; j++){
printf("%d", i);
}
printf("\n");
}
for(int i = a - 1; i >= 1; i--){
for(int j = 1; j <= i; j++){
printf("%d", i);
}
printf("\n");
}
if(t || ii != b) printf("\n");
}
}
}
return 0;
}
#include<cstring>
#include<iostream>
#include<cctype>
#include<string>
#include<cstdlib>
#include<vector>
using namespace std;
int main(){
#ifdef LOCAL
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
#endif
int t, a, b;
while(scanf("%d", &t) != EOF){
while(t--){
scanf("%d%d", &a, &b);
for(int ii = 1; ii <= b; ii++){
for(int i = 1; i <= a; i++){
for(int j = 1; j <= i; j++){
printf("%d", i);
}
printf("\n");
}
for(int i = a - 1; i >= 1; i--){
for(int j = 1; j <= i; j++){
printf("%d", i);
}
printf("\n");
}
if(t || ii != b) printf("\n");
}
}
}
return 0;
}
- uva488
- UVA488水题
- uva488 Triangle Wave
- UVa488 Triangle Wave
- Uva488 Triangle Wave
- acm-uva488(水题)
- UVa488 - Triangle Wave
- UVA488 Triangle Wave
- UVA488 - Triangle Wave
- UVA488,振幅频率输出数
- UVa488 - Triangle Wave-难度1
- uva488题意的理解和空格的控制
- 算法竞赛入门经典-前四章-UVa488 - Triangle Wave-三角波-难度1
- [解题报告]《算法竞赛入门经典》基础题Volume 0. Getting Started Uva10055 Uva10071 Uva10300 Uva458 Uva494 Uva490 Uva445 Uva488 Uva489 Uva694 Uva457
- Map值按key排序或是按 value排序
- int 与integer
- 查询win32api内部实现
- 利用LocalConnection实现多个应用之间的通讯 (不同MXML之间的通信)
- [Anroid Widget]问题集锦
- uva488
- Profile Options In INV,PO,OM,MS/MRP
- DG保护模式切换中遇到的ORA-16072错误
- 服务器获取字节流并保存文件
- 缓存的运用
- Catalan数——卡特兰数
- 如何申请外网ip地址
- 程序员记
- 刷个openwrt,并加入改写的802.1X认证客户端