Programming/JAVA

[SWEA] 2046. 스탬프 찍기

ElAsJay 2021. 2. 14. 18:19
728x90

문제

사용자로부터 숫자(정수)를 입력받고 그 개수만큼 스탬프(#)를 찍는다.

  • 입력: 정수
  • 출력: 정수만큼 #

풀이

import java.util.Scanner;
import java.io.FileInputStream;

class Solution
{
	public static void main(String args[]) throws Exception
	{
		Scanner sc = new Scanner(System.in);
		int stamp = sc.nextInt();
        for(int i=0;i<stamp;i++){
        	System.out.print("#");
        }
        sc.close();
	}
}

패스!

SMALL