숫자의 합 import java.util.Scanner; public class Main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String a = sc.next(); int sum=0; for(int i=0;i
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 12345#include int main(void){ printf("Hello World!"); return 0;}cs 링크▼https://www.acmicpc.net/problem/2558
1234567891011121314151617import 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(); int c = sc.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); }} Colored by Color Scriptercs 링크▼https://www.acmicpc.ne..
123456789101112131415import 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); System.out.println(a-b); System.out.println(a*b); System.out.println(a/b); System.out.println(a%b); }}Colored by Color Scriptercs 링크▼https://www.acmicpc.net/problem/10869
123456789101112131415import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int ia = sc.nextInt(); int ib = sc.nextInt(); double da = (double)ia; double db = (double)ib; System.out.println(da/db); }}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
방법 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