import java.util.
*;
import java.io.*;
import java.math.*;
public class Main {
public static BigInteger caculate(BigInteger num1, BigInteger num2,
char c){
switch(c) {
case '+':
return num1.add(num2);
case '-':
return num1.subtract(num2);
case '*':
return num1.multiply(num2);
default:
return BigInteger.ZERO;
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.nextLine();
while(n-- > 0) {
String [] a = sc.nextLine().split(" ");
BigInteger num1 = new BigInteger(a[0]);
BigInteger num2 = new BigInteger(a[2]);
char c = a[1].charAt(0);
BigInteger res = caculate(num1, num2 , c);
System.out.println(res);
}
sc.close();
}
}
TEST BASIC02
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int test=sc.nextInt();
sc.nextLine();
while (test!=0) {
String s=sc.nextLine();
System.out.println(s);
test--;
}
}
}
BASIC 003
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int test=sc.nextInt();
sc.nextLine();
while (test!=0) {
String s=sc.nextLine();
System.out.println("Hi "+s);
test--;
}
}
}
BASIC 005\
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t!=0){
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
int d=sc.nextInt();
int e=sc.nextInt();
System.out.println((long)a+b+c+d+e);
t--;
}
}
}
BASIC 001
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int test=sc.nextInt();
sc.nextLine();
while (test!=0) {
String s=sc.nextLine();
System.out.println(s);
test--;
}
}
}
ELAB 2312
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s;
while(sc.hasNextLine()){
s = sc.nextLine();
int count = 0;
for(int i = 0; i < s.length(); i++){
if(s.charAt(i)>='0' && s.charAt(i)<='9'){
count++;
}
}
System.out.println(count);
}
}
}