当前位置:网站首页>1036 Programming with Obama (15 points)
1036 Programming with Obama (15 points)
2022-08-11 07:48:00 【dumb bit】
题目要求:
代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
//輸入
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
String c = scanner.next();
//先打印第一行
for (int i = 0; i < n; i++){
System.out.print(c);
}
System.out.println();
//再打印n-1行
for (int i = 0; i < Math.round(n * 0.5-2); i++){
System.out.print(c);
for (int k = 0; k < n-2; k++)
System.out.print(" ");
System.out.println(c);
}
//打印最后一行
for (int i = 0; i < n; i++){
System.out.print(c);
}
}
}
结果:
边栏推荐
- 从何跟踪伦敦金最新行情走势?
- Implementation of FIR filter based on FPGA (5) - FPGA code implementation of parallel structure FIR filter
- 1051 复数乘法 (15 分)
- 动态代理学习
- 结合均线分析k线图的基本知识
- 1071 小赌怡情 (15 分)
- Internet phone software or consolidation of attack must be "free" calls security clearance
- 【软件测试】(北京)字节跳动科技有限公司二面笔试题
- 基于FPGA的FIR滤波器的实现(4)— 串行结构FIR滤波器的FPGA代码实现
- Pytorch模型转ONNX模型
猜你喜欢
年薪40W测试工程师成长之路,你在哪个阶段?
opencv实现数据增强(图片+标签)平移,翻转,缩放,旋转
公牛10-11德里克·罗斯最强赛季记录
Redis源码:Redis源码怎么查看、Redis源码查看顺序、Redis外部数据结构到Redis内部数据结构查看源码顺序
buu—Re(5)
详述MIMIC 的ICU患者检测时间信息表(十六)
【@网络工程师:用好这6款工具,让你的工作效率大翻倍!】
【latex异常和错误】Missing $ inserted.<inserted text>You can‘t use \spacefactor in math mode.输出文本要注意特殊字符的转义
项目1-PM2.5预测
1061 判断题 (15 分)
随机推荐
求职简历这样写,轻松搞定面试官
oracle19c不支持实时同步参数,请教一下大佬们有什么好的解决办法吗?
1091 N-Defensive Number (15 points)
1091 N-自守数 (15 分)
易观分析联合中小银行联盟发布海南数字经济指数,敬请期待!
1002 写出这个数 (20 分)
从何跟踪伦敦金最新行情走势?
1002 Write the number (20 points)
1051 Multiplication of Complex Numbers (15 points)
1071 小赌怡情 (15 分)
3.2-分类-Logistic回归
JVM学习——3——数据一致性
How to choose professional, safe and high-performance remote control software
TF中的条件语句;where()
oracle19c does not support real-time synchronization parameters, do you guys have any good solutions?
Douyin share password url API tool
MySQL使用GROUP BY 分组查询时,SELECT 查询字段包含非分组字段
TF中的One-hot
matrix multiplication in tf
数仓开发知识总结