Processing math: 100%
祝同学们学习进步,编程快乐!
Problem 2720 --Structured Program I - Print a Frame

2720: Structured Program I - Print a Frame

"
Time Limit 1 秒/Second(s) Memory Limit 512 兆字节/Megabyte(s)
提交总数 861 正确数量 592
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 STL

Print a Frame 

Draw a frame which has a height of H cm and a width of W cm. For example, the following figure shows a frame which has a height of 6 cm and a width of 10 cm.

##########
#........#
#........#
#........#
#........#
##########

The input consists of multiple datasets. Each dataset consists of two integers H and W separated by a single space. 

The input ends with two 0 (when both H and W are zero).

For each dataset, print the frame made of '#' and '.'. 

Print a blank line after each dataset.

3 4
5 6
3 3
0 0
####
#..#
####

######
#....#
#....#
#....#
######

###
#.#
###
3 ≤ H, W ≤ 300

推荐代码 查看2720 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[0 ms] ꧁༺ 看看我的名字是不是很长 ༻꧂ 642937 2020-10-31 00:24:20
内存最少[0 KB] makabaka 648610 2020-11-06 20:36:15
第一AC 刘成健 315116 2018-11-16 22:10:49
第一挑战 刘成健 315116 2018-11-16 22:10:49

赛题来源/所属竞赛 会津大学《C++ Programming I》 C++程序设计(入门)

竞赛编号 竞赛名称 竞赛时间 访问比赛
1837 2024-2025-1学期《C语言程序设计》:循环结构II【24计算机】 2024-10-30 12:00:00 请登录
1776 2023-2024-1学期《C语言程序设计》:循环结构II【23计算机】 2023-10-30 00:00:00 请登录
1717 2022-2023-1学期《C语言程序设计》:循环结构II【22计算机】 2022-11-01 08:00:00 请登录
1661 2021-2022-1学期《C语言程序设计》:循环结构II【21计算机】 2021-11-01 00:00:00 请登录
1553 2020-2021-1学期《Python程序设计》多重循环II【20数据科学12班】 2020-11-08 10:00:00 请登录
AOJ
祝同学们学习进步,编程快乐!