"SWEA 2046 스탬프 찍기"의 두 판 사이의 차이

 
(사용자 3명의 중간 판 13개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;SWEA-2046 스탬프 찍기
{{SWEA|난이도=1}}
 
* N번 반복하여 #을 출력한다.
{{소스헤더|입력}}
<source lang='text'>
3
</source>
{{소스헤더|출력}}
<source lang='text'>
###
</source>


==C++==
==C++==
<source lang='cpp'>
<syntaxhighlight lang='cpp'>
#include <iostream>
#include <iostream>


24번째 줄: 16번째 줄:
     }
     }
}
}
</source>
</syntaxhighlight>


==Java==
==Java==
<source lang='java'>
<syntaxhighlight lang='java'>
import java.util.Scanner;
import java.util.Scanner;


public class MyClass {
class Solution {
     public static void main(String args[]) {
     public static void main(String args[]) {
         Scanner sc = new Scanner(System.in);
         Scanner sc = new Scanner(System.in);
40번째 줄: 32번째 줄:
     }
     }
}
}
</source>
</syntaxhighlight>
 
==Python==
<syntaxhighlight lang='python'>
#kcy
i = int(input())
print('#'*i)
</syntaxhighlight>
<syntaxhighlight lang='python'>
print( '#' * int(input()) )
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[SWEA-1938 아주 간단한 계산기]]
* [[SWEA 1938 아주 간단한 계산기]]
* [[SWEA-2072 홀수만 더하기]]
* [[SWEA 2072 홀수만 더하기]]
* [[SWEA-2071 평균값 구하기]]
* [[SWEA 2071 평균값 구하기]]


==참고==
==참고==
* https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QKdT6AyYDFAUq
* https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QKdT6AyYDFAUq
[[분류: SWEA]]

2023년 8월 25일 (금) 01:41 기준 최신판

1 개요[ | ]

SWEA 2046 스탬프 찍기

2 C++[ | ]

#include <iostream>

using namespace std;

int main() {
    int num;
    cin >> num;
    for( int i=0; i<num; i++) {
        cout << "#";
    }
}

3 Java[ | ]

import java.util.Scanner;

class Solution {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();

        for( int i=0; i<num; i++) {
           System.out.print("#");
        }
    }
}

4 Python[ | ]

#kcy
i = int(input())
print('#'*i)
print( '#' * int(input()) )

5 같이 보기[ | ]

6 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}