์ ๋ชฉ์ ๋งํฌ๋ฅผ ์ ๋ ฅํ๋ฉด ํด๋น ๋ฌธ์ ๋ก ์ด๋ํฉ๋๋ค.
no1 | 2557๋ฒ | Hello World | Python |
print("Hello World!")
no2 | 10718๋ฒ | We love kriii | Java |
class Main{
public static void main(String[] args){
System.out.println("๊ฐํ์น๊ตฌ ๋ํ์ก๊ตฐ");
System.out.println("๊ฐํ์น๊ตฌ ๋ํ์ก๊ตฐ");
}
}
3 | 10171 | ๊ณ ์์ด | Python |
print("\\ /\\")
print(" ) ( ')")
print("( / )")
print(" \\(__)|")
4 | 10172 | ๊ฐ | Java |
/*
|\_/|
|q p| /}
( 0 )"""\
|"^"` |
||_/=\\__|
*/
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("||_/=\\\\__|");
}
}
5 | 1000 | A+B | Java |
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int A = scan.nextInt();
int B = scan.nextInt();
System.out.println(A + B);
scan.close();
}
}
6 | 1001 | A-B | Java |
/*
๋ ์ ์ A์ B๋ฅผ ์
๋ ฅ๋ฐ์ ๋ค์, A-B๋ฅผ ์ถ๋ ฅํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค.
์
๋ ฅ
์ฒซ์งธ ์ค์ A์ B๊ฐ ์ฃผ์ด์ง๋ค. (0 < A, B < 10)
์ถ๋ ฅ
์ฒซ์งธ ์ค์ A-B๋ฅผ ์ถ๋ ฅํ๋ค.
*/
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int A = scan.nextInt();
int B = scan.nextInt();
System.out.print(A-B);
}
}
7 | 10998 | A×B | Java |
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int A = scan.nextInt();
int B = scan.nextInt();
System.out.print(A*B);
}
}
8 | 1008 | A/B | Java |
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
double A = scan.nextInt();
double B = scan.nextInt();
double C = A/B;
System.out.print(C);
}
}
9 | 10869 | ์ฌ์น์ฐ์ฐ | Java |
/*
๋ ์์ฐ์ A์ B๊ฐ ์ฃผ์ด์ง๋ค. ์ด๋, A+B, A-B, A*B, A/B(๋ชซ), A%B(๋๋จธ์ง)๋ฅผ ์ถ๋ ฅํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค.
์
๋ ฅ
๋ ์์ฐ์ A์ B๊ฐ ์ฃผ์ด์ง๋ค. (1 ≤ A, B ≤ 10,000)
์ถ๋ ฅ
์ฒซ์งธ ์ค์ A+B, ๋์งธ ์ค์ A-B, ์
์งธ ์ค์ A*B, ๋ท์งธ ์ค์ A/B, ๋ค์ฏ์งธ ์ค์ A%B๋ฅผ ์ถ๋ ฅํ๋ค.*/
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int A = scan.nextInt();
int B = scan.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);
}
}
10 | 10430 | ๋๋จธ์ง | Java |
/*(A+B)%C๋ ((A%C) + (B%C))%C ์ ๊ฐ์๊น?
(A×B)%C๋ ((A%C) × (B%C))%C ์ ๊ฐ์๊น?
์ธ ์ A, B, C๊ฐ ์ฃผ์ด์ก์ ๋, ์์ ๋ค ๊ฐ์ง ๊ฐ์ ๊ตฌํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค.
์
๋ ฅ
์ฒซ์งธ ์ค์ A, B, C๊ฐ ์์๋๋ก ์ฃผ์ด์ง๋ค. (2 ≤ A, B, C ≤ 10000)
์ถ๋ ฅ
์ฒซ์งธ ์ค์ (A+B)%C, ๋์งธ ์ค์ ((A%C) + (B%C))%C, ์
์งธ ์ค์ (A×B)%C,
๋ท์งธ ์ค์ ((A%C) × (B%C))%C๋ฅผ ์ถ๋ ฅํ๋ค*/
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int A = scan.nextInt();
int B = scan.nextInt();
int C = scan.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);
}
}
11 | 2588 | ๊ณฑ์ | Java |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int No1 = scan.nextInt();
int No2 = scan.nextInt();
int No3 = No2%10;//1์์๋ฆฌ
int No4 = (No2%100)/10;//10์์๋ฆฌ
int No5 = No2 / 100; //100์์๋ฆฌ
System.out.println(No1 * No3);
System.out.println(No1 * No4);
System.out.println(No1 * No5);
System.out.println(No1*No2);
scan.close();
}
}
728x90
๋ฐ์ํ