node_ids listlengths 4 1.4k | edge_index listlengths 1 2.22k | text listlengths 4 1.4k | source stringlengths 14 427k |
|---|---|---|---|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Scanner;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\tprivate StringTokenize... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main {
private StringTokenizer st;
private BufferedReader bf;
private int w;
Main() {
// readData();
Scanner sc = new Scanner(System.in);
while (sc.hasNext()){
int m = sc.nextInt();
int n = sc.nextInt();
System.out.println(Integer.toString(m+n).length());
}
sc.close();
}
private void readData() {
try {
bf = new BufferedReader(new InputStreamReader(System.in));
st = new StringTokenizer(bf.readLine());
int m = nextInt();
int n = nextInt();
System.out.println(Integer.toString(m+n).length());
} catch (Exception e) {
e.printStackTrace();
}
}
private int nextInt() throws IOException {
return Integer.parseInt(next());
}
private String next() throws IOException {
if (st == null || !st.hasMoreTokens())
st = new StringTokenizer(bf.readLine());
return st.nextToken();
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Main m = new Main();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
17,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
17,
40,
13,
4,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
63,
5
],
[
63,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t \n\tScanner sc= new Scanner (System.in);\n\tint a=0;\n\tint b=0;\n\tint c=0;\n\twhile (sc.hasNext()) {\n\t\ta = sc.nextInt();\n\t\tb = sc.nextInt();\n\t\tc = a + b;\n\t\tint\tcount = 0;\n\t\tdo {\n\t\t\tc /= 10;\n\t\t\tcount++;... | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc= new Scanner (System.in);
int a=0;
int b=0;
int c=0;
while (sc.hasNext()) {
a = sc.nextInt();
b = sc.nextInt();
c = a + b;
int count = 0;
do {
c /= 10;
count++;
} while(c != 0);
System.out.println(count);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
42,
2,
13,
17,
30,
0,
13,
20,
41,
13,
2,
4,
18,
13,
4,
18,
13,
4,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
79,
14
],
... | [
"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n \npublic class Main {\n \n public static void main(String[] args) throws IOException {\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in)... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
String s = br.readLine();
StringTokenizer st;
while (s != null) {
st = new StringTokenizer(s);
int p =Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken()) ;
System.out.println((int)Math.log10(p)+1);
s =br.readLine();
}
} catch (Exception ex) {
System.exit(0);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
2,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
43,
5
],
[
43,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main\n{\n public static void main(String... args)\n {\n final Scanner scanner = new Scanner(System.in);\n while (scanner.hasNext()) {\n final int a = scanner.nextInt();\n final int b = scanner.nextInt();\n System.out.pri... | import java.util.Scanner;
public class Main
{
public static void main(String... args)
{
final Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
final int a = scanner.nextInt();
final int b = scanner.nextInt();
System.out.println(Integer.toString(a + b).length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
2,
4,
18,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
17,
1,
40,
13,
0,
13,
17,
30,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
... | [
"import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int tmp,count;\n while(scan.hasNext()){\n tmp=scan.nextInt()+scan.nextInt();\n for(count = 1;tmp>=10;count++,tmp/=10);\n System.out.... | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int tmp,count;
while(scan.hasNext()){
tmp=scan.nextInt()+scan.nextInt();
for(count = 1;tmp>=10;count++,tmp/=10);
System.out.println(count);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
2,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
70,
5
],
[
70,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNextLine()) {\n\t\t\tString string = sc.nextLine();\n\t\t\tif (string.equals(\"\")) {\n\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tString[] a = string.split(\" \");\n\t\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNextLine()) {
String string = sc.nextLine();
if (string.equals("")) {
break;
}
String[] a = string.split(" ");
int p = Integer.parseInt(a[0]);
int q = Integer.parseInt(a[1]);
int sum = p + q;
System.out.println(String.valueOf(sum).length());
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
40,
17,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
13,
13,
14,
2,
13,
13,
30,
29,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main {\n\n\tprivate static final int NO_DATA = -1;\n\n\tpublic static void main(String[] args) {\n\n\t\t// ストリームを作成する\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
private static final int NO_DATA = -1;
public static void main(String[] args) {
// ストリームを作成する
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));
while (true) {
// 入力値を受け取り、合計を数値にして返す
int sum = getSum(reader);
// 入力がない場合は終了
if (sum == NO_DATA) {
return;
}
// 桁数を出力する
System.out.println(String.valueOf(sum).length());
}
}
/**
* ストリームから1行読み込んで、2つの数値を合計して返す。 値が取得できなかった場合は-1を返す。
*
* @param reader
* 入力ストリーム
* @return 数値の合計
*/
private static int getSum(BufferedReader reader) {
int result = NO_DATA;
try {
String line = reader.readLine();
if (line == null || line.length() == 0) {
return result;
}
String[] numArray = line.split(" ");
result = Integer.parseInt(numArray[0])
+ Integer.parseInt(numArray[1]);
} catch (IOException e) {
throw new RuntimeException();
}
return result;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
13,
23,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
2,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
13,
10,
6,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
54,
14
],
... | [
"import java.util.List;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[]args){\n\t\tDigitNum();\n\t}\n\t\n\tpublic static void DigitNum(){\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\twhile(scan.hasNext()){\n\t\... | import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
public static void main(String[]args){
DigitNum();
}
public static void DigitNum(){
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
int sum = scan.nextInt()+scan.nextInt();
System.out.println(String.valueOf(sum).length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
41,
13,
12,
13,
30,
42,
4,
13,
30,
4,
13,
23,
13,
12,
13,
30,
14,
40,
4,
18,
13,
29,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
29,
17,
12,
13,
30,
41,
13,
4,
18,
4,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
66,
5
],
[
66,
6
],
[
6,
7
],
[
6,
8
],
[
66,
9
],
[
9,
10
],
[
66,
11
],
[
11,
12
],
[
66,
13
],
[
13,
14
]... | [
"import java.util.*;\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic int a, b;\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ\n\t\twhile(read()){\n\t\t\tslove();\n\t\t}\n\t}\n\tstatic boolean read(){\n\t\t... | import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
static int a, b;
/**
* @param args
*/
public static void main(String[] args) {
// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
while(read()){
slove();
}
}
static boolean read(){
if(!sc.hasNext())
return false;
a = sc.nextInt(); b = sc.nextInt();
return true;
}
static void slove(){
int ans = Integer.toString(a+b).length();
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
4,
18,
13,
2,
13,
13,
29,
13,
23,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
58,
5
],
[
58,
6
],
[
6,
7
],
[
6,
8
],
[
58,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tSystem.out.println( digit(a, b) );\n\t\t}\n\n\t}\n\tprivate static int d... | import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
while (sc.hasNext()) {
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println( digit(a, b) );
}
}
private static int digit(int a, int b) {
int dg = Integer.toString(a + b).length();
return dg;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
42,
17,
30,
14,
2,
2,
0,
13,
4,
18,
13,
17,
4,
18,
13,
3,
0,
13,
4,
18,
13,
17,
0,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
92,
11
],
[
92,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n \n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String line;\n String[] dig... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
String line;
String[] digit;
int sum;
String buf;
StringBuilder result = new StringBuilder();
while(true) {
if( (line = br.readLine()) == null || line.isEmpty() ) break;
digit = line.split(" ");
sum = Integer.parseInt( digit[0] ) + Integer.parseInt( digit[1] );
buf = String.valueOf(sum);
result.append(buf.length()).append("\n");
}
System.out.print(result);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
4,
18,
18,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
67,
11
],
[
67,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.BufferedReader;\n\npublic class Main{\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n String line;\n\n while( (line = b... | import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
while( (line = br.readLine()) != null){
String[] s = line.split(" ");
int a = Integer.parseInt(s[0]);
int b = Integer.parseInt(s[1]);
System.out.println(1+(int)Math.log10(a+b));
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
2,
17,
2,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
42,
5
],
[
42,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n while(in.hasNext()){\n int a = in.nextInt();\n int b = in.nextInt();\n System.out.println((\"\" + (a+b)).length());\n }\n ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while(in.hasNext()){
int a = in.nextInt();
int b = in.nextInt();
System.out.println(("" + (a+b)).length());
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
13,
4... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
71,
11
],
[
71,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\t/**\n\t * AOJ002 Digit Number\n\t *\n\t * @param args\n\t * @throws IOException\n\t * ??\\?????¨??????\n\t */\n\tpublic static void main(String[] args) throws IOException {\n\n\t\t... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
/**
* AOJ002 Digit Number
*
* @param args
* @throws IOException
* ??\?????¨??????
*/
public static void main(String[] args) throws IOException {
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(System.in));
String strInput = bufferedReader.readLine();
while (strInput != null) {
String[] strDigit = strInput.split("\\s");
int sum = Integer.parseInt(strDigit[0])
+ Integer.parseInt(strDigit[1]);
System.out.println(Integer.toString(sum).length());
strInput = bufferedReader.readLine();
}
bufferedReader.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t String line;\n\t while ((line = in.readLine(... | 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 line;
while ((line = in.readLine()) != null) {
String[] ab = line.split(" ");
int a = Integer.parseInt(ab[0]);
int b = Integer.parseInt(ab[1]);
String out =Integer.toString(a+b);
System.out.println(out.length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
20,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
2,
13,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
4,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
73,
5
],
[
73,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"import java.util.*;\npublic class Main{\n public static void main(String[] args){\n\tScanner scan = new Scanner(System.in);\n\tint n,m;\n\n\tString str;\n\n\tList<Integer> list = new LinkedList<Integer>();\n\n\twhile(scan.hasNext()){\n\t n = scan.nextInt();\n\t m = scan.nextInt();\n\t str = String.valu... | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n,m;
String str;
List<Integer> list = new LinkedList<Integer>();
while(scan.hasNext()){
n = scan.nextInt();
m = scan.nextInt();
str = String.valueOf(n+m);
list.add(str.length());
}
for(Iterator<Integer> it = list.iterator(); it.hasNext();){
System.out.println(it.next());
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
13,
23,
13,
12,
13,
30,
0,
13,
13,
41,
13,
17,
42,
2,
2,
13,
17,
17,
30,
0,
13,
17,
40,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
4,
8
],
[
8,
9
],
[
4,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static int a, b;\n\tpublic static void main(String[] args) {\n\t\tScanner cin = new Scanner(System.in);\n\t\twhile(cin.hasNextInt()){\n\t\t\ta = cin.nextInt();\n\t\t\tb = cin.nextInt();\n\t\t\tsolve();\n\t\t}\n\t}\n\t\n\tpublic static void solve() {\n\t\ta += b;\... | import java.util.Scanner;
class Main {
public static int a, b;
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
while(cin.hasNextInt()){
a = cin.nextInt();
b = cin.nextInt();
solve();
}
}
public static void solve() {
a += b;
int ans = 1;
while(a / 10 > 0){
a /= 10;
ans++;
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\nimport java.util.StringTokenizer;\n\npublic class Main {\n static InputReader in;\n static PrintWriter out;\n \n static class Solu... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main {
static InputReader in;
static PrintWriter out;
static class Solution {
void solve() throws IOException {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int a = sc.nextInt();
int b = sc.nextInt();
int sum = a + b;
int cnt = 0;
while (true) {
sum /= 10;
cnt++;
if (sum == 0) {
break;
}
}
out.println(cnt);
}
// End solve()
}
// End Solution
}
public static void main(String[] args) throws IOException {
in = new InputReader(System.in);
out = new PrintWriter(System.out);
Solution solver = new Solution();
solver.solve();
out.close();
}
static class InputReader {
public BufferedReader br;
public StringTokenizer st;
public InputReader(InputStream stream) {
br = new BufferedReader(new InputStreamReader(stream));
}
public int nextInt() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Integer.parseInt(st.nextToken());
}
public long nextLong() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Long.parseLong(st.nextToken());
}
public String next() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return st.nextToken();
}
public double nextDouble() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Double.parseDouble(st.nextToken());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main\n{\n public static void main(String[] agrs)\n {\n Scanner input = new Scanner(System.in);\n while(input.hasNext())\n {\n int a = input.nextInt();\n int b = input.nextInt();\n String s = Integer.toString(a + b);\n ... | import java.util.Scanner;
class Main
{
public static void main(String[] agrs)
{
Scanner input = new Scanner(System.in);
while(input.hasNext())
{
int a = input.nextInt();
int b = input.nextInt();
String s = Integer.toString(a + b);
System.out.println(s.length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
13,
23,
13,
10,
6,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
54,
5
],
[
54,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (sc.hasNextLine()) {\n\t\t\tString[] array = (sc.nextLine().split(\" \"));\n\t\t\tint result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]);\n\t\t\tSystem.out.print... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNextLine()) {
String[] array = (sc.nextLine().split(" "));
int result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]);
System.out.println(String.valueOf(result).length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
20,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
56,
5
],
[
56,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tint a,b;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile ((scan.hasNext())) {\n\n\t\t\ta = Integer.parseInt(scan.next());\n\t\t\tb = Integer.parseInt(scan.next());\n\n\t\t\tString length = String.valueO... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int a,b;
Scanner scan = new Scanner(System.in);
while ((scan.hasNext())) {
a = Integer.parseInt(scan.next());
b = Integer.parseInt(scan.next());
String length = String.valueOf(a + b);
System.out.println(length.length());
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
41,
13,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
20,
0,
13,
2,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
73,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\tpublic static void main(String[] a) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);\n\t\tString str = \"... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] a) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
String str = "";
StringTokenizer st;
int num = 0;
while ((str = br.readLine()) != null) {
st = new StringTokenizer(str, " ");
num = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken());
str = String.valueOf(num);
System.out.println(str.length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
4,
18,
13,
30,
40,
13,
14,
2,
13,
17,
3,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
17,
42,
2,
0,
13,
17,
17,
30... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
66,
5
],
[
66,
6
],
[
6,
7
],
[
6,
8
],
[
66,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],... | [
"\nimport java.util.Scanner;\n\npublic class Main {\n\n\tprivate static int N = 200;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint cnt = 0;\n\n\t\twhile (sc.hasNextInt()) {\n\t\t\tcnt++;\n\t\t\tif (cnt > 200)\n\t\t\t\tbreak;\n\n\t\t\tint a = sc.nextInt();\n\t\t\t... |
import java.util.Scanner;
public class Main {
private static int N = 200;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int cnt = 0;
while (sc.hasNextInt()) {
cnt++;
if (cnt > 200)
break;
int a = sc.nextInt();
int b = sc.nextInt();
int sum = a + b;
int count = 1;
while ((sum /= 10) != 0) {
count++;
}
System.out.println(count);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
4,
18,
13,
4,
18,
13,
2,
13,
13,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while(scanner.hasNextInt()) {\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n System.out.println( (int)Math.floor( Math.lo... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while(scanner.hasNextInt()) {
int a = scanner.nextInt();
int b = scanner.nextInt();
System.out.println( (int)Math.floor( Math.log10(a+b) ) + 1 );
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
13,
41,
13,
17,
41,
13,
17,
42,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
74,
5
],
[
74,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\t/**\n\t * Digit Number\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\twhile (scanner.hasNext()) {\n\t\t\tint a = scanner.nextInt();\n\t\t\tint b = scanner.nextInt();\n\n\t\t\tSystem.out... | import java.util.Scanner;
public class Main {
/**
* Digit Number
* @param args
*/
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
int a = scanner.nextInt();
int b = scanner.nextInt();
System.out.println(calcNumberDigit(a, b));
}
}
private static int calcNumberDigit(int a, int b) {
int target = a + b;
int result = 1;
int divide = 10;
while (true) {
if (target / divide < 1) {
return result;
}
result++;
divide *= 10;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
2,
13,
17,
30,
3,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
87,
11
],
[
87,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
// TODO ?????????????????????????????????????????????
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true){
String tmpStr = br.readLine();
if(tmpStr == null){
break;
}
String[] tmpArray = tmpStr.split(" ");
//int num1;
int num1 = Integer.parseInt(tmpArray[0]);
int num2 = Integer.parseInt(tmpArray[1]);
int sum = num1 + num2;
int keta = 0;
for (keta = 0; sum > 0 ; keta++ ){
sum /= 10;
}
System.out.println(keta);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
4,
18,
13,
17,
4,
18,
13,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
94,
5
],
[
94,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<Integer> dataset = new ArrayList<Integer>();\n\t\twhile(sc.hasNextLine())\n\t\t{\n\t\t\tString[] splitted = sc.nextLine().split(\"\\\\s+\");\n\t\t\tdataset.add(Integer.par... | import java.util.*;
public class Main {
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
List<Integer> dataset = new ArrayList<Integer>();
while(sc.hasNextLine())
{
String[] splitted = sc.nextLine().split("\\s+");
dataset.add(Integer.parseInt(splitted[0]) + Integer.parseInt(splitted[1]));
}
for(int i = 0; i < dataset.size(); ++i)
{
System.out.println(DigitOf(dataset.get(i)));
}
}
public static int DigitOf(Integer num)
{
if(num < 10)
{
return 1;
}
else
{
return 1 + DigitOf(num/10);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
113,
11
],
[
113,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n final String SPACE = \" \";\n final String EMPTY = \"\";\n BufferedReader br = new BufferedReader(new Input... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
final String SPACE = " ";
final String EMPTY = "";
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
String str = br.readLine();
int a;
int b;
String[] temp = new String[2];
for (int i = 0; i < 200; i++) {
// 最終行であれば抜ける
if (EMPTY.equals(str) || str == null) {
break;
}
temp = str.split(SPACE);
a = Integer.parseInt(temp[0]);
b = Integer.parseInt(temp[1]);
sb.append(String.valueOf(a + b).length() + "\r\n");
str = br.readLine();
}
System.out.print(sb);
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
17,
42,
2,
13,
17,
30,
40,
13,
0,
13,
2,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
56,
5
],
[
56,
6
],
[
6,
7
],
[
6,
8
],
[
56,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],... | [
"import java.util.*;\npublic class Main{\n static Scanner sc = new Scanner(System.in);\n public static void main(String[] args){\n while(sc.hasNext()){\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = a+b;\n int m = 1;\n //System.out.println(c);\n while(c ... | import java.util.*;
public class Main{
static Scanner sc = new Scanner(System.in);
public static void main(String[] args){
while(sc.hasNext()){
int a = sc.nextInt();
int b = sc.nextInt();
int c = a+b;
int m = 1;
//System.out.println(c);
while(c >= 10){
m++;
c = c/10;
//System.out.println(c);
}
System.out.println(m);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
20,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
2,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
49,
5
],
[
49,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] arg) {\n\t\tint a = 0, b = 0;\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile (scan.hasNext()) {\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\t\t\tSystem.out.println(String.valueOf(a + b).length());\n\t\t}\n\t}\n... | import java.util.Scanner;
public class Main {
public static void main(String[] arg) {
int a = 0, b = 0;
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
a = scan.nextInt();
b = scan.nextInt();
System.out.println(String.valueOf(a + b).length());
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
80,
11
],
[
80,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t//?????°?¨????\n\t\tString line, output;\n\t\tint num1, num2;\n\n\t\t//????????????\n\t\tBufferedReader br = new BufferedReader... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
//?????°?¨????
String line, output;
int num1, num2;
//????????????
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while ((line =br.readLine()) != null) {
//??????
String[] numString = line.split(" ", 0);
//??????
num1 = Integer.parseInt(numString[0]);
num2 = Integer.parseInt(numString[1]);
//?¨????
num1 = num1 + num2;
//??????
output = String.valueOf(num1);
System.out.println(output.length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
17,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
17,
17,
41,
13,
2,
17,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
71,
5
],
[
71,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],... | [
"import java.io.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line = br.readLine();\n do{\n \tString[] in = line.split(\... | import java.io.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
String line = br.readLine();
do{
String[] in = line.split(" ", 0);
String data = "" + (Integer.parseInt(in[0]) + Integer.parseInt(in[1]));
System.out.println(data.length());
line = br.readLine();
}while(line != null);
}catch (Exception e) {
// TODO: handle exception
System.exit(0);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
20,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
48,
8
],
[
48,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line;\n while( (line = br.readLine()) != null) {\n ... | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
while( (line = br.readLine()) != null) {
String[] line2 = line.split(" ");
Integer i = new Integer(Integer.parseInt(line2[0]) + Integer.parseInt(line2[1]));
System.out.println(i.toString().length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
0,
13,
13,
42,
2,
13,
17,
30,
40,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
12,
13,
30,
4,
18,
20... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
58,
5
],
[
58,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\n\t\t\tint ans = 0;\n\t\t\ta += b;\n\t\t\twhile (a > 0) {\n\t\t\t\tans++;\n\t\t\t\ta /= 10;\n\t\t\t}\n\t\t\tSystem.out... | import java.util.Scanner;
public class Main {
void run() {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int a = sc.nextInt();
int b = sc.nextInt();
int ans = 0;
a += b;
while (a > 0) {
ans++;
a /= 10;
}
System.out.println(ans);
}
}
public static void main(String[] args) {
new Main().run();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
2,
13,
17,
30,
3,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"\n//Digit Number\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\n\nclass Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n\t\twhile ... |
//Digit Number
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
while (true) {
String tmp = in.readLine();
if (tmp == null) {
break;
}
String[] ab = tmp.split(" ");
int a = Integer.parseInt(ab[0]);
int b = Integer.parseInt(ab[1]);
// String out =Integer.toString(a+b);
// System.out.println(out.length());
//
int i = 0;
while (true) {
i++;
if (Math.pow(10, i) > a + b) {
break;
}
}
System.out.println(i);
}
// Scanner scan = new Scanner(System.in);
//
// while(scan.hasNext()){
//
// String[] ab = scan.next().split(" ");
//
// int a = Integer.parseInt(ab[0]);
// int b = Integer.parseInt(ab[1]);
//
//// String out =Integer.toString(a+b);
//// System.out.println(out.length());
////
//
// int i=0;
// while(true){
// i++;
// if(Math.pow(10, i)>a+b){
// break;
// }
// }
// System.out.println(i);
//
// }
// scan.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
13,
4,
18,
4,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
61,
5
],
[
61,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.*;\npublic class Main{\n\tpublic static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\twhile((str=br.readLine())!=null){\n\t\t\tString[] num=str.split(\" \");\n\t\t\tin... | import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str;
while((str=br.readLine())!=null){
String[] num=str.split(" ");
int sum=Integer.parseInt(num[0])+Integer.parseInt(num[1]);
System.out.println(String.valueOf(sum).length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
82,
5
],
[
82,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
... | [
"import java.io.*;\n\npublic class Main {\n\tpublic static void main(String args[]) throws IOException{\n\t\tString str,dataSet[];\n\t\tint i,j,total,count = 1;\n\t\tBufferedReader input =\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\twhile((str = input.readLine()) != null){\n\t\t\tdataSet = s... | import java.io.*;
public class Main {
public static void main(String args[]) throws IOException{
String str,dataSet[];
int i,j,total,count = 1;
BufferedReader input =
new BufferedReader(new InputStreamReader(System.in));
while((str = input.readLine()) != null){
dataSet = str.split(" ");
i = Integer.parseInt(dataSet[0]);
j = Integer.parseInt(dataSet[1]);
total = i+j;
while((total /= 10) >= 1){
count++;
//System.out.println("total = " + total);
}
System.out.println(count);
count = 1;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
2,
17,
17,
41,
13,
17,
12,
13,
30,
0,
13,
20,
11,
1,
30,
30,
14,
40,
4,
18,
13,
3,
41,
13,
4,
18,
13,
41,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.util.*;\nimport java.lang.*;\nimport java.math.*;\nimport java.io.*;\n\nimport static java.lang.Math.*;\nimport static java.util.Arrays.*;\n\npublic class Main{\n\n\tScanner sc;\n\n\tstatic final int INF=1<<28;\n\tstatic final double EPS=1e-9;\n\n\tvoid run(){\n\t\tsc=new Scanner(System.in);\n\t\tfor(;... | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class Main{
Scanner sc;
static final int INF=1<<28;
static final double EPS=1e-9;
void run(){
sc=new Scanner(System.in);
for(;;){
if(!sc.hasNext())
break;
int a=sc.nextInt();
int b=sc.nextInt();
println(""+(int)ceil(log10(a+b+1)));
}
sc.close();
}
void print(String s){
System.out.print(s);
}
void println(String s){
System.out.println(s);
}
public static void main(String[] args){
new Main().run();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
14,
2,
2... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\n\t\twhile((str = br.readLine()) != null) {... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while((str = br.readLine()) != null) {
String num[] = str.split(" ", 0);
int x = Integer.parseInt(num[0]);
int y = Integer.parseInt(num[1]);
if(x <= 1000000 && y <= 1000000 ) {
System.out.println(String.valueOf(x+y).length());
}
}
br.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
2,
13,
13,
28,
13,
13,
30,
30,
4,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
65,
11
],
[
65,
12
],
[
12,
13
],
[
65,
14
],
... | [
"import java.util.Scanner;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class Main {\n private static int a, b;\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n List<String> num_st = new ArrayList<String>();\n while (stdIn.hasNextInt()) {\n a =... | import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;
public class Main {
private static int a, b;
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
List<String> num_st = new ArrayList<String>();
while (stdIn.hasNextInt()) {
a = stdIn.nextInt();
b = stdIn.nextInt();
num_st.add(String.valueOf(a+b));
}
for (String sum: num_st) {
System.out.println(sum.length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
20,
17,
41,
13,
20,
17,
41,
13,
20,
17,
41,
13,
41,
13,
20,
0,
13,
17,
42,
4,
18,
13,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
0,
13,
2... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
104,
5
],
[
104,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n int i,j;\n \tint[] a = new int[1000000];\n \tint[] b = new int[1000000];\n \tint[] k = new int[1000000];\n \tint c; \n Scanner scan = new Scanner(System.in);\n \n i = 0;\n ... | import java.util.Scanner;
public class Main{
public static void main(String[] args){
int i,j;
int[] a = new int[1000000];
int[] b = new int[1000000];
int[] k = new int[1000000];
int c;
Scanner scan = new Scanner(System.in);
i = 0;
while(scan.hasNextInt()){
a[i] = scan.nextInt();
b[i] = scan.nextInt();
c = a[i]+b[i];
j = 0;
while(c > 0){
c= c/10;
j++;
}
k[i] = j;
i++;
}
j = 0;
while(j < i){
System.out.println(k[j]);
j++;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
0,
13,
20,
41,
13,
20,
17,
41,
13,
38,
5,
13,
30,
4,
18,
13,
30,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
116,
11
],
[
116,
12
],
[
12,
13
],
[
12,
14
],... | [
"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] a) {\n\t\tBufferedReader br;\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tint[] num = new int[2];\n\t\tString str;\n\t\ttry {\n\t\t\twh... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] a) {
BufferedReader br;
br = new BufferedReader(new InputStreamReader(System.in));
int[] num = new int[2];
String str;
try {
while ((str = br.readLine()) != null) {
String[] array = str.split(" ");
for (int h = 0; h < array.length / 2; h++) {
for (int i = 0; i < 2; i++) {
num[i] = Integer.parseInt(array[i + h * 2]);
}
int answer = (int) Math.log10(num[0] + num[1]) + 1;
System.out.println(answer);
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n\tScanner s = new Scanner(System.in);\n\tint a , b , sum , valLen;\n\n\twhile(s.hasNext()){\n\t\tString line = s.nextLine();\n\t\tString[] array = line.split(\" \",0);\n\t\ta = Integer.parseInt(array[0]);\n\t\tb = Integer.... | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner s = new Scanner(System.in);
int a , b , sum , valLen;
while(s.hasNext()){
String line = s.nextLine();
String[] array = line.split(" ",0);
a = Integer.parseInt(array[0]);
b = Integer.parseInt(array[1]);
sum = a + b;
valLen = String.valueOf( sum ).length();
System.out.println(valLen);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
18,
13,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
... | [
"import java.io.*;\nclass Main{\n public static void main (String[] args) throws IOException{\n\n\tBufferedReader br=\n\t new BufferedReader(new InputStreamReader(System.in));\n\tString buf;\n\twhile((buf=br.readLine())!= null){\n\t String[] buf2=buf.split(\" \");\n\t int data2=0;\n\t for(int i=0;i!... | import java.io.*;
class Main{
public static void main (String[] args) throws IOException{
BufferedReader br=
new BufferedReader(new InputStreamReader(System.in));
String buf;
while((buf=br.readLine())!= null){
String[] buf2=buf.split(" ");
int data2=0;
for(int i=0;i!=buf2.length;i++){
data2+=Integer.parseInt(buf2[i]);
}
String ans=(new Integer(data2)).toString();
System.out.println(ans.length());
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
17,
42,
17,
30,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
4,
18,
17,
13,
3,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
114,
11
],
[
114,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringBuilder sb = new St... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
int dataNum = 0;
while (true) {
String input = br.readLine();
if (input == null || "".equals(input)) break;
int a = Integer.parseInt(input.split(" ")[0]);
int b = Integer.parseInt(input.split(" ")[1]);
if (dataNum > 200) break;
if ((a == 0) && (b == 0)) break;
if (!((a >= 0 && a <= 1000000) && (b >= 0 && b <= 1000000))) break;
System.out.println(String.valueOf(a + b).length());
dataNum++;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
17,
41,
13,
20,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
20,
14,
40,
4,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\nimport java.util.StringTokenizer;\n\nclass Main {\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.StringTokenizer;
class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String line = null;
List<Integer> results = new ArrayList<Integer>();
while ((line = br.readLine()) != null) {
StringTokenizer st = new StringTokenizer(line);
if (!st.hasMoreTokens()) break;
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
results.add(Integer.toString(a + b).length());
}
for (int x : results) {
System.out.println(x);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
13,
23,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
17,
17,
41,
13,
4,
18,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
88,
11
],
[
88,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tprint();\n\t}\n\n\tprivate static void print() {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\ttry {\n\t\t\tSt... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
print();
}
private static void print() {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
String str = br.readLine();
while (str != null) {
String[] nums = str.split(" ", 0);
int x = Integer.parseInt(nums[0]);
int y = Integer.parseInt(nums[1]);
int keta = Integer.toString(x+y).length();
System.out.println(keta);
str = br.readLine();
}
} catch (IOException e) {
e.printStackTrace();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
17,
30,
41,
13,
2,
2,
13,
13,
13,
14,
2,
13,
17,
30,
3,
30,
0,
13,
17,
40,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main {\n public static void main( String args[] ) {\n Scanner scan = new Scanner( System.in );\n\n while( scan.hasNext() ) {\n int x = scan.nextInt();\n int y = scan.nextInt();\n int z = 1;\n int out = 0;\n while( true ) {\n int r = ( x + y ... | import java.util.Scanner;
class Main {
public static void main( String args[] ) {
Scanner scan = new Scanner( System.in );
while( scan.hasNext() ) {
int x = scan.nextInt();
int y = scan.nextInt();
int z = 1;
int out = 0;
while( true ) {
int r = ( x + y ) / z;
if( r == 0 ) {
break;
} else {
z *= 10;
out++;
}
}
System.out.println(out);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
17,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
11,
1,
0,
13,
17,
2,
17,
13,
1,
40,
13,
30,
30,
0,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
68,
5
],
[
68,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint a,b,i,c=0;\n\t\twhile (stdIn.hasNext()) {\n\t\t\ta = stdIn.nextInt();\n\t\t\tb = stdIn.nextInt();\n\t\t\tc=a+b;\n\t\t\tfor(i=0;0<c;i++){\n\t\t\t\tc=c/10;\n\t\t\t}\n\t\t\... | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int a,b,i,c=0;
while (stdIn.hasNext()) {
a = stdIn.nextInt();
b = stdIn.nextInt();
c=a+b;
for(i=0;0<c;i++){
c=c/10;
}
System.out.println(i);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
4,
18,
13,
2,
13,
13,
28,
13,
13,
30,
30,
4,
18,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
61,
11
],
[
61,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tList<Integer> list = new ArrayList<Integer>();\n\n\t\twhile (stdIn.hasNext())\n\t\t{\n\t\t\tint a = stdIn.nextIn... | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args)
{
Scanner stdIn = new Scanner(System.in);
List<Integer> list = new ArrayList<Integer>();
while (stdIn.hasNext())
{
int a = stdIn.nextInt();
int b = stdIn.nextInt();
list.add(String.valueOf((a + b)).length());
}
for (int value : list)
{
System.out.println(value);
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
14,
2,
2,
17,
13,
2,
13,
17,
30,
29,
17,
29,
2,
4,
13,
2,
13,
17,
17,
23,
13,
12,
13,
30,
38,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
72,
5
],
[
72,
6
],
[
6,
7
],
[
6,
8
],
[
72,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\n\npublic class Main{\n\tstatic int turn=0;\n\tstatic int dfs(int sum) {\n\t\tif(0<=sum && sum<=9) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn dfs(sum/10)+1;\n\t}\n public static void main(String[] args) {\n \ttry (Scanner sc = new Scanner(System.in)) {\n \t\twhile(sc.hasNext()) {\n... | import java.util.Scanner;
public class Main{
static int turn=0;
static int dfs(int sum) {
if(0<=sum && sum<=9) {
return 1;
}
return dfs(sum/10)+1;
}
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
while(sc.hasNext()) {
int a=sc.nextInt();
int b=sc.nextInt();
int sum=a+b;
System.out.println(dfs(sum));
}
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
71,
11
],
[
71,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n \twhile(line!=nu... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
while(line!=null){
String[] lines = line.split(" ");
int a = Integer.parseInt(lines[0]);
int b = Integer.parseInt(lines[1]);
System.out.println(Integer.toString(a+b).length());
line = br.readLine();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
11,
1,
4,
18,
13,
30,
30,
41,
13,
2,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
2,
13,
17,
1,
0,
13,
17,
40,
13,
30,
4,
18,
18,
13,
13,
2,
13,
17,
23,
13,
10,
6,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
54,
5
],
[
54,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tfor(;scanner.hasNext();)\n\t\t{\n\t\t\tint c = scanner.nextInt() + scanner.nextInt();\n\t\t\tint s = 0;\n\t\t\tfor(; c>0; c/=10, s++);\n\t\t\t\n\t\t\tSystem.out... | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
for(;scanner.hasNext();)
{
int c = scanner.nextInt() + scanner.nextInt();
int s = 0;
for(; c>0; c/=10, s++);
System.out.println(s+"");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
2,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
41,
13,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
70,
5
],
[
70,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int sum = 0;\n while (scanner.hasNextInt()) {\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n System.out... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int sum = 0;
while (scanner.hasNextInt()) {
int a = scanner.nextInt();
int b = scanner.nextInt();
System.out.println(getDigit(a + b));
}
}
static int getDigit(int value) {
if (value == 0) { return 1; }
int digit = 0;
while (value > 0) {
value /= 10;
digit++;
}
return digit;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.ArrayList;\n \npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedRead... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Collections;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String input = "";
while((input = br.readLine()) != null){
String[] arr = input.split(" ");
int a = Integer.parseInt(arr[0]);
int b = Integer.parseInt(arr[1]);
int inputAngka = a + b;
System.out.println(count(inputAngka));
}
}
public static int count(int a) {
if (a < 10) {
return 1;
} else {
return 1 + count(a / 10);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
20,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
2,
13,
13,
23,
13,
10,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
55,
8
],
[
55,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.ArrayList;\nimport java.util.Scanner;\n\n//public class Main {\n//\n//\tpublic static void main(String[] args) {\n//\t\t// TODO ?????????????????????????????????????????????\n//\t\tScanner s = new Scanner(System.in);\n//\t\tint a,b;\n//\t\tArrayList<String> str = new ArrayList<String>();\n//\t\tSt... | import java.util.ArrayList;
import java.util.Scanner;
//public class Main {
//
// public static void main(String[] args) {
// // TODO ?????????????????????????????????????????????
// Scanner s = new Scanner(System.in);
// int a,b;
// ArrayList<String> str = new ArrayList<String>();
// String[] result;
//
// for(int i = 0;i <3;i++)
// {
// str.add(s.nextLine());
//
// }
//
// for(int i = 0;i<3;i++)
// {
// result = str.get(i).split(" ");
// a = Integer.parseInt(result[0]);
// b = Integer.parseInt(result[1]);
// System.out.println(String.valueOf(a+b).length());
// }
// }
//}
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner s = new Scanner(System.in);
int a,b;
ArrayList<String> str = new ArrayList<String>();
String[] result;
while(s.hasNext())
{
a = s.nextInt();
b = s.nextInt();
System.out.println(String.valueOf(a+b).length());
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
38,
5,
13,
30,
3,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
4,
18,
13,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
4,
18,
18,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
61,
8
],
[
61,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while(true) {\n try{\n String[] line = br.readLin... | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true) {
try{
String[] line = br.readLine().split(" ");
int length = String.valueOf(Integer.parseInt(line[0]) + Integer.parseInt(line[1])).length();
System.out.println(length);
}catch(NullPointerException e) {
break;
}
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
38,
5,
13,
30,
30,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
2,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
79,
11
],
[
79,
12
],
[
12,
13
],
[
12,
14
],
... | [
"\nimport java.util.ArrayList;\nimport java.util.NoSuchElementException;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\t\n\t\ttry{\n\t\t\twhile(sc.hasNextInt()){\n... |
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<Integer> result = new ArrayList<Integer>();
try{
while(sc.hasNextInt()){
int a = sc.nextInt();
int b = sc.nextInt();
result.add(a + b);
}
}catch(NoSuchElementException e){
//üͪIíÁ½ç½à¹¸ÉðÌubNÖ
}
for(int i = 0; i < result.size(); i++){
System.out.println(String.valueOf(result.get(i)).length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
2,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
43,
5
],
[
43,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while ( scanner.hasNextInt() ) {\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n System.out.println( Integer.toStri... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while ( scanner.hasNextInt() ) {
int a = scanner.nextInt();
int b = scanner.nextInt();
System.out.println( Integer.toString( a + b ).length() );
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
2,
13,
17,
30,
3,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"\n//Digit Number\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\n\nclass Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n\t\twhile ... |
//Digit Number
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
while (true) {
String tmp = in.readLine();
if (tmp == null) {
break;
}
String[] ab = tmp.split(" ");
int a = Integer.parseInt(ab[0]);
int b = Integer.parseInt(ab[1]);
String out =Integer.toString(a+b);
System.out.println(out.length());
}
// Scanner scan = new Scanner(System.in);
//
// while(scan.hasNext()){
//
// String[] ab = scan.next().split(" ");
//
// int a = Integer.parseInt(ab[0]);
// int b = Integer.parseInt(ab[1]);
//
//// String out =Integer.toString(a+b);
//// System.out.println(out.length());
////
//
// int i=0;
// while(true){
// i++;
// if(Math.pow(10, i)>a+b){
// break;
// }
// }
// System.out.println(i);
//
// }
// scan.close();
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
39,
17,
17,
17,
17,
17,
17,
17,
17,
17,
18,
13,
13,
12,
13,
30,
11,
1,
41,
13,
17,
1,
40,
13,
30,
30,
14,
2,
13,
18,
13,
13,
29,
2,
13,
17,
23,
13,
12,
13,
30,
38,
5,
13,
30,
4,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
8,
10
],
[
8,
11
],
[
8,
12
],
[
8,
13
],
[
8,
14
],
[
... | [
"/* Volume2 */\nimport java.io.*;\n\nclass Main\n{\n final static int[] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999, 99999999, 999999999, Integer.MAX_VALUE };\n\n public static int stringSize(int x){\n for(int i=0; ; i++){\n if(x <= sizeTable[i]) return i+1;\n }\n }\n\n public static void ... | /* Volume2 */
import java.io.*;
class Main
{
final static int[] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999, 99999999, 999999999, Integer.MAX_VALUE };
public static int stringSize(int x){
for(int i=0; ; i++){
if(x <= sizeTable[i]) return i+1;
}
}
public static void main(String[] args)
{
try{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
String str = "";
while((str = br.readLine()) != null){
String[] input = str.split(" ");
int sum = Integer.parseInt(input[0]) + Integer.parseInt(input[1]);
sb.append(stringSize(sum)).append("\n");
}
System.out.print(sb);
}catch(Exception e){
System.out.println(e);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
41,
13,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
20,
0,
13,
2,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\nclass Main {\n public static void main(String[] a) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str = \"... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class Main {
public static void main(String[] a) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = "";
StringTokenizer st;
int add = 0;
while ((str = br.readLine()) != null) {
st = new StringTokenizer(str, " ");
add = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken());
int keta = Integer.toString(add).length();
System.out.println(keta);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
20,
41,
13,
20,
38,
5,
13,
30,
30,
14,
2,
13,
17,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
20,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
127,
11
],
[
127,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n final String SPACE = \" \";\n final String EMPTY = \"\";\n BufferedReader br = new BufferedReader(new Input... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
final String SPACE = " ";
final String EMPTY = "";
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
try {
String str = br.readLine();
int a;
int b;
String[] temp = new String[2];
for (int i = 0; i < 200; i++) {
// 最終行であれば抜ける
if (EMPTY.equals(str) || str == null) {
break;
}
temp = str.split(SPACE);
a = Integer.parseInt(temp[0]);
b = Integer.parseInt(temp[1]);
sb.append(String.valueOf(a + b).length() + "\r\n");
str = br.readLine();
}
} catch (IOException e) {
// NOP
} finally {
if (br != null) {
br.close();
}
}
System.out.print(sb);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
4,
18,
13,
2,
13,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
46,
5
],
[
46,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n\n while (in.hasNext()) {\n int a = in.nextInt();\n int b = in.nextInt();\n int k = (int)Math.log10( (double)(a+b) )+1;\n ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
int a = in.nextInt();
int b = in.nextInt();
int k = (int)Math.log10( (double)(a+b) )+1;
System.out.println(k);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
14,
2,
13,
17,
0,
13,
2,
4,
18,
13,
17,
4,
18,
13,
17,
0,
13,
2,
4,
18,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.*;\nimport java.util.*;\n\nclass Main{\n\tprivate static ArrayList<Integer> sum_dig(ArrayList<Integer> a){\n\t\tArrayList<Integer> b = new ArrayList<Integer>();\n\t\tfor(int i = 0;i<a.size()/2;i++){\n\t\t\tint sum = 0;\n\t\t\tif(i == 0) sum = a.get(0)+a.get(1);\n\t\t\tsum = a.get(i*2)+a.get(i*2+1);... | import java.io.*;
import java.util.*;
class Main{
private static ArrayList<Integer> sum_dig(ArrayList<Integer> a){
ArrayList<Integer> b = new ArrayList<Integer>();
for(int i = 0;i<a.size()/2;i++){
int sum = 0;
if(i == 0) sum = a.get(0)+a.get(1);
sum = a.get(i*2)+a.get(i*2+1);
String sums;
sums = String.valueOf(sum);
b.add(sums.length());
}
return b;
}
private static void print_dig(ArrayList<Integer> a){
for(int i = 0;i<a.size();i++){
System.out.println(a.get(i));
}
}
public static void main(String args[]) throws IOException{
ArrayList<Integer> dig = new ArrayList<Integer>();
Scanner scan = new Scanner(System.in);
int n1,n2;
while(scan.hasNext()){
try{
String str1 = scan.next();
String str2 = scan.next();
n1 = Integer.parseInt(str1);
n2 = Integer.parseInt(str2);
dig.add(n1);
dig.add(n2);
}
catch(NumberFormatException e){
break;
}
}
ArrayList<Integer> res = new ArrayList<Integer>();
res = sum_dig(dig);
print_dig(res);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
2,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
49,
5
],
[
49,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (scanner.hasNext()) {\n int result = Integer.parseInt(scanner.next()) + Integer.parseInt(scanner.next());\n int length = String.valu... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
int result = Integer.parseInt(scanner.next()) + Integer.parseInt(scanner.next());
int length = String.valueOf(result).length();
System.out.println(length);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
2,
4,
18,
13,
18,
13,
17,
4,
18,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
62,
11
],
[
62,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\t/**\n\t * 引数で与えられた2つの数値を足し、計算後の桁数を出力する。\n\t *\n\t * @param args\n\t * 利用しない\n\t * @throws IOException\n\t */\n\tpublic static void main(String[] args) throws IOException {\n\n\t\t//... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
/**
* 引数で与えられた2つの数値を足し、計算後の桁数を出力する。
*
* @param args
* 利用しない
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// 入力値を受け取る
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = null;
while ((line = br.readLine()) != null) {
// 引数を足した後の桁数を出力する
String[] number = line.split(" ");
System.out.println(String
.valueOf(
(Integer.parseInt(number[0]) + Integer
.parseInt(number[1]))).length());
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
4,
18,
13,
13,
4,
18,
13,
13,
28,
13,
13,
30,
3... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"\nimport java.util.Scanner;\nimport java.util.ArrayList;\nclass Main\n{\n\tpublic static void main(String[] av)\n\t{\n\t\tScanner sc = new Scanner( System.in );\n\t\tArrayList<Integer> al = new ArrayList<Integer>();\n\n\t\twhile( sc.hasNextInt() )\n\t\t{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n... |
import java.util.Scanner;
import java.util.ArrayList;
class Main
{
public static void main(String[] av)
{
Scanner sc = new Scanner( System.in );
ArrayList<Integer> al = new ArrayList<Integer>();
while( sc.hasNextInt() )
{
int a = sc.nextInt();
int b = sc.nextInt();
int sum = a + b;
int digit = String.valueOf(sum).length();
al.add( digit );
}
for ( Integer num : al )
{
System.out.println(num );
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
51,
5
],
[
51,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],... | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n try (Scanner sc = new Scanner(System.in)){\n while(sc.hasNextInt()){\n int a = sc.nextInt();\n int b = sc.nextInt();\n int ans = a + b;\n int ansLen ... | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
try (Scanner sc = new Scanner(System.in)){
while(sc.hasNextInt()){
int a = sc.nextInt();
int b = sc.nextInt();
int ans = a + b;
int ansLen = String.valueOf(ans).length();
System.out.println(ansLen);
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
11,
1,
30,
30,
41,
13,
4,
18,
13,
14,
2,
13,
17,
3,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
2,
13,
13,
41,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
73,
5
],
[
73,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"\nimport java.io.*;\n\npublic class Main {\n\n\t//ツ 0002\n\tpublic static void main(String[] args) throws IOException {\n\t\t\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tfor(;;) {\n\t\t\n\t\t\tString s = reader.readLine();\n\t\t\tif (s == null)\n\t\t\t\tbreak;\n\t\t\t\... |
import java.io.*;
public class Main {
//ツ 0002
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
for(;;) {
String s = reader.readLine();
if (s == null)
break;
String[] sp = s.split(" ");
int a = Integer.parseInt(sp[0]);
int b = Integer.parseInt(sp[1]);
int c = a+b;
String ans = "" + c;
System.out.printf("%s\n", ans.length());
}
reader.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main {\n public static void main(String[] args) throws IOException {\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n String str;\n while ((str = buf.readLine()) != null) ... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String str;
while ((str = buf.readLine()) != null) {
String[] nums = str.split(" ");
int sum = Integer.parseInt(nums[0]) + Integer.parseInt(nums[1]);
System.out.println(Integer.toString(sum).length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
65,
5
],
[
65,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\tint s = a + b;\n\t\t\tString S = String.valueOf(s);\n\t\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws java.io.IOException {
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
int a = scan.nextInt();
int b = scan.nextInt();
int s = a + b;
String S = String.valueOf(s);
if(a == 0 && b == 0){
System.out.println("0");
}else{
System.out.println(S.length());
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
17,
38,
5,
13,
30,
30,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
3,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.io.*;\n\nclass Main{\n\tpublic static void main(String args[]){\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString input=\"\";\n\t\t\ttry{\n\t\t\t\tinput = reader.readLine();\n\t\t\t}catch(IOException e){\n\t\t\t\t\n\t\t\t}\n\t\t\tif(input... | import java.io.*;
class Main{
public static void main(String args[]){
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
while(true){
String input="";
try{
input = reader.readLine();
}catch(IOException e){
}
if(input==null){
break;
}
String array[] = input.split(" ");
int a = Integer.parseInt(array[0]);
int b = Integer.parseInt(array[1]);
int num = a+b;
int cou=0;
while(num>0){
num/=10;
cou++;
}
System.out.println(cou);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
20,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main{\n public static void main(String[] a)throws IOException{\n \tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n \t\tString str = null;\n \t\tString[] strList = new String[2];... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main{
public static void main(String[] a)throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String str = null;
String[] strList = new String[2];
while((str = in.readLine()) != null){
strList = str.split(" ");
int sum = Integer.parseInt(strList[0])+Integer.parseInt(strList[1]);
System.out.println(String.valueOf(sum).length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main{\n\n\n\n public static void main(String[] a){\n\n\n Scanner sc = new Scanner(System.in);\n\n while(sc.hasNext()) {\n\n\n\t \tint z = sc.nextInt();\n\t \tint y = sc.nextInt();\n\n\t \tint ans = z + y;\n\t \tString ansSt = String.va... | import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int z = sc.nextInt();
int y = sc.nextInt();
int ans = z + y;
String ansSt = String.valueOf(ans);
int ansK = ansSt.length();
System.out.println(ansK);
}
sc.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
14,
2,
2,
2,
2,
4,
18,
13,
18,
13,
17,
17,
2,
4,
18,
13,
18,
13,
17,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.*;\nimport java.io.*;\n \nclass Main{\n public static void main(String[] args)throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s;\n int num = 0;\n while((s=br.readLine())!=null){\n String[] str = s.sp... | import java.util.*;
import java.io.*;
class Main{
public static void main(String[] args)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s;
int num = 0;
while((s=br.readLine())!=null){
String[] str = s.split(" ");
if(Integer.parseInt(str[0])<0 || Integer.parseInt(str[0])>1000000 ||
Integer.parseInt(str[1])<0 || Integer.parseInt(str[1])>1000000){
continue;
}
num = Integer.parseInt(str[0]) + Integer.parseInt(str[1]);
//System.out.println(str[0]+"\t"+str[1] + "\t"+num);
int a = String.valueOf(num).length();
System.out.println(a);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
2,
13,
17,
40,
13,
4,
18,
18,
13,
13,
2,
13,
17,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
58,
5
],
[
58,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"\nimport java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\n\t\t\tint n = a + b;\n\t\t\tint cnt = 1;\n\t\t\twhile (n != 0) {\n\t\t\t\tn = n / 10;\n\t\t\... |
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int a = sc.nextInt();
int b = sc.nextInt();
int n = a + b;
int cnt = 1;
while (n != 0) {
n = n / 10;
cnt++;
}
System.out.println(cnt - 1);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
0,
13,
4,
18,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
55,
11
],
[
55,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Arrays;\nimport java.util.Comparator;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[] ) throws Exception {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile(scanner.hasNext()){\t\n\t\t\tint a = scanner.nextInt();//??????????????°??????????????????... | import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
public class Main {
public static void main(String args[] ) throws Exception {
Scanner scanner = new Scanner(System.in);
while(scanner.hasNext()){
int a = scanner.nextInt();//??????????????°??????????????????
int b = scanner.nextInt();//????????????????????????????????°??????????????????
int ans = a+b;
ans = String.valueOf( ans ).length();
System.out.println(ans);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
17,
38,
5,
13,
30,
30,
41,
13,
20,
11,
1,
41,
13,
40,
17,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
4,
18,
13,
17,
30,
0,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Arrays;\nimport java.util.Scanner;\n\nclass Main{\n public static void main(String[] x){\n\t\tbyte[] k = new byte[200];\n\t\ttry{\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tfor(byte i=-127;i<73;i++){\n\t\t\t\tString s = sc.nextLine();\n\t\t\t\tif(s==null||s.equals(\"\")){\n\t\t\t\t\tk[i... | import java.util.Arrays;
import java.util.Scanner;
class Main{
public static void main(String[] x){
byte[] k = new byte[200];
try{
Scanner sc = new Scanner(System.in);
for(byte i=-127;i<73;i++){
String s = sc.nextLine();
if(s==null||s.equals("")){
k[i+127]=0;
break;
}
k[i+127] = dig(Integer.parseInt((s.split(" ",0))[0])+Integer.parseInt((s.split(" ",0))[1]));
}
}catch(Exception e){}
for(byte i=-127;i<73;i++){
if(k[i+127]>0){System.out.println(k[i+127]);}
else{break;}
}
}
public static byte dig(int a){
byte d = 0;
while(true){
if(a>=10){
d++;
a/=10;
}
else{return (byte)((int)d+1);}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
17,
40,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
2... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[... | [
"import java.util.*;\n\nclass Main {\n\tpublic static int digitNumber(int number) {\n\t\tint count = 0;\n\t\twhile (number != 0) {\n\t\t\tnumber /= 10;\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (scanner.hasNex... | import java.util.*;
class Main {
public static int digitNumber(int number) {
int count = 0;
while (number != 0) {
number /= 10;
count++;
}
return count;
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
int a = scanner.nextInt();
int b = scanner.nextInt();
System.out.println(digitNumber(a + b));
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
52,
5
],
[
52,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint a,b,sum;\n\t\t\n\t\twhile (sc.hasNextInt()) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\t\n\t\t\tsum = a + b;\n\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int a,b,sum;
while (sc.hasNextInt()) {
a = sc.nextInt();
b = sc.nextInt();
sum = a + b;
System.out.println(Integer.toString(sum).length());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
0,
13,
20,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
77,
5
],
[
77,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
11,
13
],
[
8,
14
],
... | [
"import java.util.Scanner;\n\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t//??????????????°\n\t\tScanner sc;\t\t//??\\???\n\t\tint a=0;\n\t\tint b=0;\n\t\tint kotae=0;\n\t\tint i=0;\n\n\t\tsc = new Scanner(System.in);\n\n\t\twhile(sc.hasNext()){\n\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.ne... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
//??????????????°
Scanner sc; //??\???
int a=0;
int b=0;
int kotae=0;
int i=0;
sc = new Scanner(System.in);
while(sc.hasNext()){
a = sc.nextInt();
b = sc.nextInt();
kotae = a + b;
String skotae = String.valueOf(kotae);
int keta = skotae.length();
System.out.println(keta);
if(i >= 200){
break;
}
i= i+1;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
38,
5,
13,
30,
4,
18,
13,
17,
30,
41,
13,
20,
41,
13,
20,
0,
13,
4,
18,
13,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nclass Main{\n public static void main(String args[]){\n\tString str;\n\ttry{\n\t InputStreamReader is = new InputStreamReader(System.in);\n\t BufferedReader br = new BufferedReader(is);\n\t str = br.readLine();\n\t while(str !=null){... | import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main{
public static void main(String args[]){
String str;
try{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
str = br.readLine();
while(str !=null){
String[] strary = str.split(" ");
int n1 = Integer.parseInt(strary[0]);
int n2 = Integer.parseInt(strary[1]);
int sum = n1 + n2;
String s = Integer.toString(sum);
System.out.println((s.length()));
str = br.readLine();
}
}
catch(Exception e){
System.exit(0);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
0,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
104,
14
],
... | [
"import java.util.Scanner;\nimport java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.List;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a;\n int b;\n int sum;\n int digits = 0;\n List<Inte... | import java.util.Scanner;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a;
int b;
int sum;
int digits = 0;
List<Integer> list = new ArrayList<>();
while(sc.hasNext()) {
a = sc.nextInt();
b = sc.nextInt();
sum = a + b;
digits = 0;
//System.out.println(sum);
for(;sum>=1;sum=sum/10) {
digits = digits+1;
}
//System.out.println(digits);
list.add(digits);
}
for(Iterator it = list.iterator(); it.hasNext();) {
System.out.println(it.next());
}
sc.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
20,
4,
18,
13,
30,
4,
18,
18,
13,
13,
2,
17,
4,
18,
13,
2,
4,
18,
13,
4,
18,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
9,
14
],
... | [
"import java.util.*;class Main{public static void main(String[]g){for(Scanner S=new Scanner(System.in);S.hasNext();)System.out.println(1+(int)Math.log10(S.nextInt()+S.nextInt()));}}",
"import java.util.*;",
"util.*",
"java",
"class Main{public static void main(String[]g){for(Scanner S=new Scanner(System.in)... | import java.util.*;class Main{public static void main(String[]g){for(Scanner S=new Scanner(System.in);S.hasNext();)System.out.println(1+(int)Math.log10(S.nextInt()+S.nextInt()));}}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
42,
2,
2,
13,
17,
17,
30,
40,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
56,
5
],
[
56,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint Dig = 1;\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint kei = a+b;\n\t\t\twhile(kei/10 != 0){\n\t\t\t\tDig ++;\n\t\t\t\tkei /... | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int Dig = 1;
int a = sc.nextInt();
int b = sc.nextInt();
int kei = a+b;
while(kei/10 != 0){
Dig ++;
kei /= 10;
}
System.out.println(Dig);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
2,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
43,
5
],
[
43,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(sc.hasNext()) {\n int sum=sc.nextInt()+sc.nextInt();\n System.out.println(String.valueOf(sum).length());\n }\n sc.close();\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int sum=sc.nextInt()+sc.nextInt();
System.out.println(String.valueOf(sum).length());
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
2,
4,
18,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
66,
5
],
[
66,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint a, b;\n\t\t\n\t\twhile(scanner.hasNext()) {\n\t\t\ta = scanner.nextInt();\n\t\t\tb = scanner.nextInt();\n\t\t\tif (a == 0 && b == 0) {\n\t\t\t\tSystem.out.println(1);... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a, b;
while(scanner.hasNext()) {
a = scanner.nextInt();
b = scanner.nextInt();
if (a == 0 && b == 0) {
System.out.println(1);
} else {
System.out.println((int)Math.floor(Math.log10(a + b)) + 1);
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
2,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
43,
5
],
[
43,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (sc.hasNext()) {\n int l = sc.nextInt();\n int r = sc.nextInt();\n System.out.println(Integer.toString(l+r).length());\n }\n }\n}",
"import java.util.*;",... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int l = sc.nextInt();
int r = sc.nextInt();
System.out.println(Integer.toString(l+r).length());
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
4,
18,
18,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
84,
11
],
[
84,
12
],
[
12,
13
],
[
12,
14
],
... | [
"\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
while ((line = br.readLine()) != null) {
String[] arr = line.split(" ");
int a = Integer.parseInt(arr[0]);
int b = Integer.parseInt(arr[1]);
System.out.println(f(a + b));
}
}
public static int f(int sum) {
int i = 0;
while (sum != 0) {
sum /= 10;
i++;
}
return i;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
17,
0,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.io.*;\nclass Main {\n public static void main(String... args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n while(s != null) {\n String[] arr = s.split(\" \");\n int sum = Integer.parseInt(arr[0]) + Int... | import java.io.*;
class Main {
public static void main(String... args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
while(s != null) {
String[] arr = s.split(" ");
int sum = Integer.parseInt(arr[0]) + Integer.parseInt(arr[1]);
System.out.println((int)Math.log10(sum)+1);
s = br.readLine();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
2,
13,
17,
3,
41,
13,
4,
18,
13,
17,
4,
18,
13,
17,
41,
13,
4,
18,
13,
2,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
90,
5
],
[
90,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.*;\npublic class Main {\n\n\tpublic static void main(String[] args)throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br =new BufferedReader(is);\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tif(str == null)\n\t\t\t\tbreak;\n\t\t\tSt... | import java.io.*;
public class Main {
public static void main(String[] args)throws IOException {
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br =new BufferedReader(is);
while(true){
String str = br.readLine();
if(str == null)
break;
String str1 = str.substring(0, str.indexOf(" "));
String str2 = str.substring(str.indexOf(" ")+1);
int n1 = Integer.parseInt(str1);
int n2 = Integer.parseInt(str2);
int count1=0;
n1 = n1 + n2;
while(n1 > 0){
n1 = n1/10;
count1++;
}
System.out.println(count1);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
2,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
2,
4,
18,
13,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
59,
5
],
[
59,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"\nimport java.util.Scanner;\n\n\npublic class Main{\n\t\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\twhile(sc.hasNextInt()) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tSystem.out.println(numOfDigit(a+b));\n\t\t}\n\t\tsc.close();\n\t}\n\t\... |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a, b;
while(sc.hasNextInt()) {
a = sc.nextInt();
b = sc.nextInt();
System.out.println(numOfDigit(a+b));
}
sc.close();
}
static int numOfDigit(int n) {
return (int) Math.log10(n) + 1;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
13,
0,
13,
17,
42,
2,
13,
17,
30,
40,
13,
0,
13,
17,
4,
18,
18,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
61,
8
],
[
61,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\nimport java.util.Arrays;\npublic class Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner input = new Scanner(System.in);\n int a, b, count;\n while( input.hasNext() )\n {\n a = input.nextInt();\n b = input.nextInt();\n ... | import java.util.Scanner;
import java.util.Arrays;
public class Main
{
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
int a, b, count;
while( input.hasNext() )
{
a = input.nextInt();
b = input.nextInt();
a += b;
count = 0;
while( a > 0 )
{
count ++;
a /= 10;
}
System.out.println( count );
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
42,
4,
18,
13,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
13,
23,
13,
10,
6,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
54,
5
],
[
54,
6
],
[
6,
7
],
[
6,
8
],
[
54,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\t\twhile(sc.hasNext()) {\n\t\t\tString[] numbers = sc.nextLine().split(\" \");\n\n\t\t\tInteger ans = Integer.parseInt(numbers[0]) + Integer.parseInt(numbers[1]);\n\t\t\tS... | import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
while(sc.hasNext()) {
String[] numbers = sc.nextLine().split(" ");
Integer ans = Integer.parseInt(numbers[0]) + Integer.parseInt(numbers[1]);
System.out.println(String.valueOf(ans).length());
}
}
} |
[
7,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
17,
42,
4,
18,
13,
30,
0,
13,
2,
4,
18,
13,
4,
18,
13,
0,
13,
17,
42,
2,
13,
17,
30,
0,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
3,
4
],
[
3,
5
],
[
5,
6
],
[
6,
7
],
[
6,
8
],
[
5,
9
],
[
9,
10
],
[
5,
11
],
[
11,
12
],
[
11,
13
],
[
5,
14
],
[... | [
"class Main\n{\n\tpublic static void main( String[] args )\n\t{\n\t\tjava.util.Scanner sc = new java.util.Scanner( System.in );\n\t\tint sum;\n\t\tint digitNum = 0;\n\t\t\n\t\twhile( sc.hasNext() )\n\t\t{\n\t\t\tsum = sc.nextInt() + sc.nextInt();\n\t\t\t\n\t\t\tdigitNum = 0;\n\t\t\twhile( sum > 0 )\n\t\t\t{\n\t\t\... | class Main
{
public static void main( String[] args )
{
java.util.Scanner sc = new java.util.Scanner( System.in );
int sum;
int digitNum = 0;
while( sc.hasNext() )
{
sum = sc.nextInt() + sc.nextInt();
digitNum = 0;
while( sum > 0 )
{
sum /= 10;
digitNum++;
}
System.out.println( digitNum );
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
13,
13,
0,
13,
4,
13,
13,
4,
18,
18,
13,
13,
4,
13,
2,
13,
13,
23,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
133,
11
],
[
133,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tint a,b;\n\t\twhile((str=in.read... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String str;
int a,b;
while((str=in.readLine())!=null){
a=getA(str);
b=getB(str);
System.out.println(countDigit(a+b));
}
}
public static int getA(String str){
int index,num;
index = str.indexOf(" ");
num=Integer.parseInt(str.substring(0,index));
return num;
}
public static int getB(String str){
int index,num;
index = str.indexOf(" ");
num=Integer.parseInt(str.substring(index+1));
return num;
}
public static int countDigit(int num){
int dig=1;
while(num>=10){
num=num/10;
dig++;
}
return dig;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
17,
41,
13,
20,
17,
42,
2,
13,
17,
30,
0,
13,
4,
18,
13,
17,
17,
0,
18,
13,
17,
4,
18,
13,
18,
13,
17,
0,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
94,
11
],
[
94,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str = br.readLine();\n\t\tString[] datasets... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
String[] datasetstr = new String[2];
int[] datasetint = new int[2];
while (str != null) {
datasetstr = str.split(" ", 2);
datasetint[0] = Integer.parseInt(datasetstr[0]);
datasetint[1] = Integer.parseInt(datasetstr[1]);
System.out.println(Math.round(Math.ceil(Math.log10(datasetint[0]
+ datasetint[1] + 1))));
str = br.readLine();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
2,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
59,
5
],
[
59,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNextInt()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tdouble c=a+b;\n\t\t\tint cnt=0;\n\t\t\twhile(c>=1){\n\t\t\t\tc=c/10;\n\t\t\t\tcnt++;\n\t\t\t}\n\... | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
int a=sc.nextInt();
int b=sc.nextInt();
double c=a+b;
int cnt=0;
while(c>=1){
c=c/10;
cnt++;
}
System.out.println(cnt);
}
sc.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
23,
13,
10,
6,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
54,
5
],
[
54,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n while (sc.hasNext()) {\n String s = sc.nextLine();\n String[] req = s.split(\" \");\n System.out.println(String.v... | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String s = sc.nextLine();
String[] req = s.split(" ");
System.out.println(String.valueOf(Integer.parseInt(req[0]) + Integer.parseInt(req[1])).length());
}
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.