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 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.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 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.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 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 UVA12996 {
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 L = sc.nextInt();
int [] M = new int[N];
import java.util.Scanner;
public class UVA12918 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
while(T-->0) {
int n = sc.nextInt();
int m = sc.nextInt();
int extra = m - n;
import java.util.Scanner;
public class UVA11608 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int c = 1;
while(sc.hasNextInt()) {
int p = sc.nextInt();
if( p == -1) {
break;
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 t = 1; t <= T; t++) {
int N = sc.nextInt();
int [] A = new int[N];
int [] B = new int[N];
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;
public class UVA11804 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = Integer.parseInt(sc.nextLine());