Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class FPP{
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int n = scan.nextInt();
- String str1="",str2="";
- int count=0;
- for (int i=0;i<=n;i++) {
- if(count==0)
- {
- str1=str1+(i+1);
- }else if (count==1 || count==2) {
- str2=str2+(i+1);
- }else{
- str1=str1+(i+1);
- if (count==4) {
- count=0;
- }
- }
- count++;
- }
- int num1,num2;
- num1 = Integer.parseInt(str1);
- num2 = Integer.parseInt(str2);
- System.out.println(num1);
- System.out.println(num2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement