Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 광유다
- list
- 지크슈
- 유니티슈팅게임
- map
- mutex
- 뮤텍스
- Java
- StartActivityForResult
- semaphore
- 스핀락
- 바이너리세마포
- 안드로이드스튜디오
- Vector
- 포톤
- unorderedmap
- 유니티
- 게임개발
- NotFoundException: String resource ID #0x0
- dependencyResilutionManagement
- unityAR
- registerForActivityResult
- photon
- ARface
- 세마포
- C++
- Unity
- unorderedset
- 동기화
- SpinLock
Archives
- Today
- Total
와와
백준 2739 / 자바 본문
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
for(int i=1;i<10;i++) {
System.out.println( N + " * " + i + " = " + ( N * i ) );
}
}
}
2739번: 구구단
N을 입력받은 뒤, 구구단 N단을 출력하는 프로그램을 작성하시오. 출력 형식에 맞춰서 출력하면 된다.
www.acmicpc.net
이렇게 풀었다가
사람들 코드 살펴보니까 나보다 시간도 적고 메모리도 적길래
버퍼리더 넣어서 다시 풀어봤다.
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
for( int i = 1; i < 10 ; i++ ) {
System.out.println( N + " * " + i + " = " + ( N * i ) );
}
}
}
'개발 > 자바' 카테고리의 다른 글
백준 8393 / 자바 (0) | 2021.01.08 |
---|---|
백준 10950 / 자바 (1) | 2021.01.07 |
백준 2884 / 자바 (0) | 2021.01.06 |
백준 1000 / 자바 (0) | 2020.12.26 |
백준 2557 / 자바 (0) | 2020.12.26 |