package PAT_B_1006换个格式输出整数_15;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int num = scanner.nextInt();
int a = 0, b = 0, c = 0;
a = num / 100;
b = num % 100 / 10;
c = num % 10;
for (int i = 0; i < a; i++) {
System.out.print("B");
}
for (int i = 0; i < b; i++) {
System.out.print("S");
}
for (int i = 1; i <= c; i++) {
System.out.print(i);
}
}
}
提交时间 | 状态 | 分数 | 题目 | 编译器 | 耗时 | 用户 |
---|
2021/06/24 23:22:01 | 答案正确 | 15 | 编程题 | Java (javac) | 225 ms | |
测试点 | 结果 | 分数 | 耗时 | 内存 |
---|
0 | 答案正确 | 4 | 134 ms | 15060 KB |
1 | 答案正确 | 4 | 225 ms | 15584 KB |
2 | 答案正确 | 1 | 128 ms | 14760 KB |
3 | 答案正确 | 1 | 125 ms | 14900 KB |
4 | 答案正确 | 1 | 128 ms | 14832 KB |
5 | 答案正确 | 1 | 132 ms | 15192 KB |
6 | 答案正确 | 1 | 157 ms | 15048 KB |
7 | 答案正确 | 1 | 131 ms | 15156 KB |
8 | 答案正确 | 1 | 124 ms | 14956 KB |