当前位置:网站首页>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);
}
}
}
结果:
边栏推荐
- 【sdx62】XBL设置共享内存变量,然后内核层获取变量实现
- Tf中的平方,多次方,开方计算
- 关于Android Service服务的面试题
- Item 2 - Annual Income Judgment
- pytorch,numpy两种方法实现nms类间+类内
- go-grpc TSL认证 解决 transport: authentication handshake failed: x509 certificate relies on ... ...
- 如何选择专业、安全、高性能的远程控制软件
- 1002 Write the number (20 points)
- 详述MIMIC 的ICU患者检测时间信息表(十六)
- Activity的四种启动模式
猜你喜欢
随机推荐
There may be fields that cannot be serialized in the abnormal object of cdc and sqlserver. Is there anyone who can understand it? Help me to answer
为什么C#中对MySQL不支持中文查询
LeetCode brushing series -- 46. Full arrangement
oracle19c does not support real-time synchronization parameters, do you guys have any good solutions?
Pinduoduo API interface
【Pytorch】nn.PixelShuffle
接入网、承载网、核心网是什么,交换机路由器是什么、这个和网络的协议有什么关系呢?
那些事情是用Unity开发项目应该一开始规划好的?如何避免后期酿成巨坑?
2.1-梯度下降
1002 Write the number (20 points)
NTT的Another Me技术助力创造歌舞伎演员中村狮童的数字孪生体,将在 “Cho Kabuki 2022 Powered by NTT”舞台剧中首次亮相
线程交替输出(你能想出几种方法)
囍楽云任务源码
Douyin share password url API tool
1051 Multiplication of Complex Numbers (15 points)
进制转换间的那点事
3.2-分类-Logistic回归
Unity3D learning route?
How do you optimize the performance of your Unity project?
2021-08-11 for循环结合多线程异步查询并收集结果