当前位置:网站首页>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);
}
}
}
结果:
边栏推荐
猜你喜欢
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
TF通过feature与label生成(特征,标签)集合,tf.data.Dataset.from_tensor_slices
1076 Wifi密码 (15 分)
1003 我要通过 (20 分)
Tidb二进制集群搭建
详述 MIMIC护理人员信息表(十五)
关于Excel实现分组求和最全文档
1091 N-自守数 (15 分)
2.1-梯度下降
Trill keyword search goods - API
随机推荐
详述 MIMIC护理人员信息表(十五)
1101 How many times B is A (15 points)
1096 大美数 (15 分)
2022-08-09 第四小组 修身课 学习笔记(every day)
【软件测试】(北京)字节跳动科技有限公司二面笔试题
机器学习总结(二)
求职简历这样写,轻松搞定面试官
【Pytorch】nn.ReLU(inplace=True)
NTT的Another Me技术助力创造歌舞伎演员中村狮童的数字孪生体,将在 “Cho Kabuki 2022 Powered by NTT”舞台剧中首次亮相
易观分析联合中小银行联盟发布海南数字经济指数,敬请期待!
Serverless + domain name can also build a personal blog? Really, and soon
项目2-年收入判断
1046 划拳 (15 分)
2022年中国软饮料市场洞察
联想集团:2022/23财年第一季度业绩
[Recommender System]: Overview of Collaborative Filtering and Content-Based Filtering
Waldom Electronics宣布成立顾问委员会
Unity底层是如何处理C#的
项目1-PM2.5预测
C语言每日一练——Day02:求最小公倍数(3种方法)