import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.Stack; class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); Stack stack = new Stack(); Stack result = new Stack(); String input = in.readLine(); int size = input.length(); if(size == 1 && input.equ..
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.Stack; class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); Stack stack = new Stack(); String input = in.readLine(); int size = input.length(); for(int i=size-1; i>=0; i = i-3) { int a = (int)input..
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String[] input = in.readLine().split(" "); String n = input[0]; int b = Integer.parseInt(input[1]); int lengthOfN = n.length(); int result = 0; for(int i=length..
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String[] input = in.readLine().split(" "); long n = Long.parseLong(input[0]); int b = Integer.parseInt(input[1]); solve(n, b); System.out.println(); } static vo..
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int count = Integer.parseInt(in.readLine()); String[] cases = new String[count]; for(int i=0; i
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int count = Integer.parseInt(in.readLine()); String[] cases = new String[count]; for(int i=0; i
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String[] input = in.readLine().split(" "); int[] numbers = new int[2]; for(int i=0; i
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; class Main { static int d[]; public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int count = Integer.parseInt(in.readLine()); String[] input = in.readLine().split(" "); int[] sequence = new int[count]; for(int i=0;i
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; class Main { static int d[]; public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int count = Integer.parseInt(in.readLine()); String input[] = in.readLine().split(" "); int[] sequence = new int[count]; for(int i=0; i result) ..
import java.io.*; class Main { static int d[]; public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int size = Integer.parseInt(in.readLine()); d = new int[size]; String[] input = in.readLine().split(" "); int[] sequence = new int[size]; for(int i=0; i