全部评论
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String line = scanner.nextLine();
System.out.print(line);
scanner.close();
for (int i = 0; i < 3; i++) {
new Print(i, "_" + (char)('A' + i)).start();
}
}
}
class Print extends Thread {
public static volatile int flag = 0;
private int id;
private String val;
public Print(int id, String val) {
this.val = val;
this.id = id;
}
@Override
public void run() {
while (true) {
if (id == flag) {
System.out.print(val);
flag++;
return;
}
}
}
} 没超时,通过
同超时,本地通过了
public class Main { public class void main(String[] a) { Scanner in = new Scanner(System.in); String str = in.nextLine(); System.out.println(str + "_A_B_C"); } } 这样过可以吗?
没有也,你的代码是怎样的呢?这是我的博客链接https://blog.csdn.net/qq_40859852/article/details/100145993,希望能对你有帮助。
相关推荐
2025-12-14 11:43
黑龙江大学 Java
用微笑面对困难:确实比较烂,可以这么修改:加上大学的qs排名,然后大学简介要写一些,然后硕士大学加大加粗,科研经历第一句话都写上在复旦大学时,主要负责xxxx,简历左上角把学校logo写上,建议用复旦大学的简历模板 点赞 评论 收藏
分享
2025-11-07 17:29
北京理工大学珠海学院 嵌入式软件工程师 点赞 评论 收藏
分享
点赞 评论 收藏
分享
