This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigInteger; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
BigInteger n = new BigInteger(sc.nextLine()); | |
char c = sc.nextLine().charAt(0); | |
BigInteger m = new BigInteger(sc.nextLine()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.Scanner; | |
class Nation implements Comparable<Nation>{ | |
int nationNum; | |
int gold; | |
int silver; | |
int bronze; | |
int rank; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int n = sc.nextInt(); | |
while(n-- > 0) { | |
int m = sc.nextInt(); | |
int gradeSum = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static final int MAX = 10001; | |
public static int getNum(int x) { | |
int sum = x; | |
while(x >= 10) { | |
sum += x%10; | |
x /= 10; | |
} | |
sum += x; | |
return sum; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static final int MAX = 1000000; | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
boolean[] isPrime = new boolean[MAX+1]; | |
for(int i = 2; i <= MAX; i++) { | |
isPrime[i] = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static final int MAX = 1000000; | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
boolean[] isPrime = new boolean[MAX+1]; | |
for(int i = 2; i <= MAX; i++) { | |
isPrime[i] = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static final int MAX = 1001; | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
boolean[] isPrime = new boolean[MAX]; | |
for(int i = 2; i < MAX; i++) { | |
isPrime[i] = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int n = sc.nextInt(); | |
int k = sc.nextInt(); | |
boolean[] isPrime = new boolean[n+1]; | |
for(int i = 2; i <= n; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
public class Main { | |
public static final int MAX = 25; | |
public static void main(String[] args) { | |
ArrayList<Integer> primeList = new ArrayList<Integer>(); | |
boolean isPrime[] = new boolean[MAX + 1]; | |
for(int i = 2; i <= MAX; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int n = sc.nextInt(); | |
int[][] map = new int[100][100]; | |
int cnt = 0; | |
for(int i = 0; i < n; i++) { |
NewerOlder