Case #1: 2
Case #2: 5
Case #3: 7
Case #4: 17
Case #5: 7
<ํ์ด๋ณด์ค์>
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int i = 1; i<=T; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println("Case #" + i + ": "+ (a+b));
}
}
}
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.IOException;
import java.util.StringTokenizer;
public class Solution11021_bf {
public static void main (String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
StringTokenizer st;
int T = Integer.parseInt(br.readLine());
for (int i=1; i<=T; i++) {
st = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
bw.write("Case #"+ i + ": " + +(a+b) + "\n");
}
bw.close();
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
String str = "";
sc.close();
for (int i =1; i<=N/4; i++) {
str += "long ";
}
System.out.println(str + "int");
}
}
import java.util.Scanner;
public class Solution25304 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int X,N,a,b;
X = sc.nextInt();
N = sc.nextInt();
int sum =0;
for (int i =0; i<N; i++) {
a = sc.nextInt();
b = sc.nextInt();
sum += a * b;
}
if (sum == X) {
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int total = sc.nextInt();
int count = sc.nextInt();
for(int i = 0; i< count; i++){
int price = sc.nextInt();
int num = sc.nextInt();
total = total - (price * num);
}
if(total == 0) System.out.println("Yes");
else System.out.println("No");
}
}
import java.util.Scanner;
public class Solution10950 {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
int arr[] = new int[t];
for (int i = 0; i<t; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
arr[i] = a + b;
}
// sc.close();
for (int k : arr) {
System.out.println(k);
}
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(n*(n+1)/2);
}
}
import java.util.Scanner;
public class Main_2 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int sum=0;
for (int i=1; i<=n; i++) {
sum +=i;
}
System.out.println(sum);
}
}