char a[100]
while(gets(a)!='\0')
#include<bits/stdc++.h>
using namespace std;
char a[100+5];
int main()
{
int n;
scanf("%d",&n);
getchar();
while(n--)
{
gets(a);
}
return 0;
}
java
样例:
2
5 1 2 3 4 5
6 1 2 3 4 5 6
import java.util.Scanner;
public class welcome {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
while (input.hasNext()) {
int t = input.nextInt();// 有几组数据
while (t-- > 0) {
int n = input.nextInt();
int[] a = new int[10000];
for (int i = 0; i < n; i++) {
a[i] = input.nextInt();
}
}
}
}
}