import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
sc.nextLine();
while(n-->0){
String str=sc.nextLine();
String s=""+6;
for(int i=6;i<str.length();i++){
s+=str.charAt(i);
}
System.out.println(s);
}
}
}
class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
sc.nextLine();
while(n-->0){
String str=sc.nextLine();
String s=""+6;
for(int i=6;i<str.length();i++){
s+=str.charAt(i);
}
System.out.println(s);
}
}
}
本文介绍了一个简单的Java程序,该程序使用Scanner类从标准输入读取多个字符串,并从中提取特定部分进行输出。主要关注如何跳过前六个字符并打印剩余部分。
807

被折叠的 条评论
为什么被折叠?



