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..