[JAVA] 백준 10171번 고양이
public class Main { public static void main(String[] args) { System.out.println("\\ /\\\n" + " ) ( ')\n" + "( / )\n" + " \\(__)|"); } }
public class Main { public static void main(String[] args) { System.out.println("\\ /\\\n" + " ) ( ')\n" + "( / )\n" + " \\(__)|"); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Integer a = scanner.nextInt(); Integer b = scanner.nextInt(); Integer c = scanner.nextInt(); System.out.println((a+b)%c); System.out.println(((a%c) + (b%c))%c); System.out.println((a*b)%c); System.out.println(((a%c)*(b%c))%c); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Integer a = scanner.nextInt(); if (a=90) { System.out.println("A"); } else if (a=80) { System.out.println("B"); } else if (a=70) { System.out.println("C"); } else if (a=60) { System.out.println("D"); } else { System.out.println("F"); } } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Integer a = scanner.nextInt(); Integer b = scanner.nextInt(); System.out.println(a+b); System.out.println(a-b); System.out.println(a*b); System.out.println(a/b); System.out.println(a%b); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Integer a = scanner.nextInt(); Integer b = scanner.nextInt(); System.out.println(a*b); } }
public class Main { public static void main(String[] args) { System.out.println("강한친구 대한육군"); System.out.print("강한친구 대한육군"); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String a = scanner.nextLine(); if (a.equals("A+")){ System.out.println(4.3); } else if (a.equals("A0")) { System.out.println(4.0); } else if (a.equals("A-")) { System.out.println(3.7); } else if (a.equals("B+")) { System.out.println(3.3); } else if (a.equals("B0")) { S..
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Integer a = scanner.nextInt(); if (a%4==0){ if (a%100!=0 || a%400==0) { System.out.println("1"); }else { System.out.println("0"); } }else { System.out.println("0"); } }}