当前位置:网站首页>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);
}
}
}
结果:
边栏推荐
猜你喜欢
随机推荐
prometheus学习5altermanager
3.2-分类-Logistic回归
NFT 的价值从何而来
opencv实现数据增强(图片+标签)平移,翻转,缩放,旋转
JVM学习——3——数据一致性
Serverless + domain name can also build a personal blog? Really, and soon
Unity游戏排行榜的制作与优化
一张图了解JVM八大原子操作
Discourse 的关闭主题(Close Topic )和重新开放主题
接入网、承载网、核心网是什么,交换机路由器是什么、这个和网络的协议有什么关系呢?
Strongly recommend an easy-to-use API interface
1056 组合数的和 (15 分)
【Pytorch】nn.Linear,nn.Conv
Redis source code-String: Redis String command, Redis String storage principle, three encoding types of Redis string, Redis String SDS source code analysis, Redis String application scenarios
1051 复数乘法 (15 分)
1106 2019数列 (15 分)
TF中的条件语句;where()
PIXHAWK飞控使用RTK
oracle19c不支持实时同步参数,请教一下大佬们有什么好的解决办法吗?
2022-08-09 Group 4 Self-cultivation class study notes (every day)








