import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.LinkedList;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuffer sb = new StringBuffer("");
String m="";
LinkedList<String[]> list=new LinkedList<String[]>();
String arr[]={"00","01","81"};
list.add(arr);
String[] arr2={"0000","0001","2025","3025","9801"};
list.add(arr2);
String arr3[]={"000000","000001","088209","494209","998001"};
list.add(arr3);
String arr4[]={"00000000","00000001","04941729","07441984","24502500","25502500","52881984","60481729","99980001"};
list.add(arr4);
while((m=br.readLine())!=null) {
int x=Integer.parseInt(m);
for(int i=0;i<list.get((x/2)-1).length;i++){
sb.append(list.get((x/2)-1)[i]).append("\n");
}
}
System.out.print(sb);
}
}
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.LinkedList;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuffer sb = new StringBuffer("");
String m="";
LinkedList<String[]> list=new LinkedList<String[]>();
String arr[]={"00","01","81"};
list.add(arr);
String[] arr2={"0000","0001","2025","3025","9801"};
list.add(arr2);
String arr3[]={"000000","000001","088209","494209","998001"};
list.add(arr3);
String arr4[]={"00000000","00000001","04941729","07441984","24502500","25502500","52881984","60481729","99980001"};
list.add(arr4);
while((m=br.readLine())!=null) {
int x=Integer.parseInt(m);
for(int i=0;i<list.get((x/2)-1).length;i++){
sb.append(list.get((x/2)-1)[i]).append("\n");
}
}
System.out.print(sb);
}
}
No comments:
Post a Comment