Skip to content

Instantly share code, notes, and snippets.

View johirbuet's full-sized avatar
🎯
Focusing

Md Johirul Islam johirbuet

🎯
Focusing
  • Lowe's
  • Mooresville, NC
View GitHub Profile
import java.util.Scanner;
public class UVA12952 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNextInt()) {
int A = sc.nextInt();
int B = sc.nextInt();
if(A == B) {
System.out.println(A);
import java.util.Scanner;
public class UVA12917 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNextInt()) {
int P = sc.nextInt();
int H = sc.nextInt();
int O = sc.nextInt();
int moreO = (O - P);
import java.util.Scanner;
public class UVA12908 {
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
while(sc.hasNextInt()) {
int S = sc.nextInt();
if(S == 0) {
break;
import java.util.Arrays;
import java.util.Scanner;
public class UVA10474 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = 1;
while(sc.hasNextInt()) {
int N = sc.nextInt();
int Q = sc.nextInt();
import java.util.Scanner;
public class UVA12955 {
public static void main(String[] args) {
int [] fact =new int[12];
fact[0] = fact[1] = 1;
for(int i=2;i<=10;i++) {
fact[i] = i*fact[i-1];
}
Scanner sc = new Scanner(System.in);
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class UVA489 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNextLine()) {
import java.util.Scanner;
public class UVA133 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNextInt()) {
int N = sc.nextInt();
int k =sc.nextInt();
int m = sc.nextInt();
import java.util.Scanner;
public class UVA12149 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNextInt()) {
int n = sc.nextInt();
if(n == 0) {
break;
}
import java.util.Collections;
import java.util.PriorityQueue;
import java.util.Scanner;
public class UVA12541 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PriorityQueue<Person> minheap = new PriorityQueue<>();
PriorityQueue<Person> maxheap = new PriorityQueue<>(Collections.reverseOrder());
int T = Integer.parseInt(sc.nextLine());
import java.util.Scanner;
public class UVA12992 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int t = 1; t <= T; t++) {
int N = sc.nextInt();
int r = (N - 1) * 2 + + 1 ;
System.out.println("Case #"+t+": "+r);