12345678910import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ System.out.println(sc.nextLine()); } }}Colored by Color Scriptercs
방법 1) 123456public class Main{ public static void main(String args[]){ System.out.println("강한친구 대한육군"); System.out.println("강한친구 대한육군"); }}Colored by Color Scriptercs 방법 2) 12345public class Main{ public static void main(String args[]){ System.out.println("강한친구 대한육군\n강한친구 대한육군"); }}Colored by Color Scriptercs 1print("강한친구 대한육군\n강한친구 대한육군")cs
escape sequence에 관련된 문제이다. 123456789 public class Main{ public static void main(String args[]){ System.out.println("|\\_/|"); System.out.println("|q p| /}"); System.out.println("( 0 )\"\"\"\\"); System.out.println("|\"^\"` |"); System.out.println("||_/=\\\\__|"); } }Colored by Color Scriptercs 123456print("|\\_/|");print("|q p| /}");print("( 0 )\"\"\"\\");print("|\"^\"` |");print("||_/=\\\\__|")..
123456public class Main{ public static void main(String[] args){ System.out.println("10"); System.out.println("12345678"); }}Colored by Color Scriptercs
123456789101112import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); System.out.println(a-b); }}Colored by Color Scriptercs 12a,b=input().split()print(int(a)-int(b))cs
12345public class Main{ public static void main(String[] args){ System.out.println("Hello World!"); }}Colored by Color Scriptercs 1print("Hello World!")cs
1234567891011import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); System.out.println(a+b); }}Colored by Color Scriptercs 12a,b=input().split()print(int(a)+int(b))cs