为什么我创建三个输入对象就是错误

import java.util.Scanner;

public class Main {
public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        
        Scanner sc1 = new Scanner(System.in);
        String A=sc1.nextLine();
        
        Scanner sc2 = new Scanner(System.in);
        String B=sc2.nextLine();
        
        
            for(int m=0;m<n;m++) {  
                B=B+A;
                A=A+B;      
            }   
                System.out.println(A);          
        sc.close();
        sc1.close();
        sc2.close();
    }

}

0 条评论

目前还没有评论...

信息

难度
2
分类
(无)
标签
递交数
1184
已通过
233
通过率
20%
被复制
5
上传者