-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[level 0] Title: 홀짝 구분하기, Time: 12.63 ms, Memory: 7.48 MB -BaekjoonHub
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# [level 0] 홀짝 구분하기 - 181944 | ||
|
||
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/181944) | ||
|
||
### 성능 요약 | ||
|
||
메모리: 7.48 MB, 시간: 12.63 ms | ||
|
||
### 구분 | ||
|
||
코딩테스트 연습 > 코딩 기초 트레이닝 | ||
|
||
### 채점결과 | ||
|
||
정확성: 100.0<br/>합계: 100.0 / 100.0 | ||
|
||
### 제출 일자 | ||
|
||
2024년 06월 12일 12:10:10 | ||
|
||
### 문제 설명 | ||
|
||
<p>자연수 <code>n</code>이 입력으로 주어졌을 때 만약 <code>n</code>이 짝수이면 "<code>n</code> is even"을, 홀수이면 "<code>n</code> is odd"를 출력하는 코드를 작성해 보세요.</p> | ||
|
||
<hr> | ||
|
||
<h5>제한사항</h5> | ||
|
||
<ul> | ||
<li>1 ≤ <code>n</code> ≤ 1,000</li> | ||
</ul> | ||
|
||
<hr> | ||
|
||
<h5>입출력 예</h5> | ||
|
||
<p>입력 #1</p> | ||
<div class="highlight"><pre class="codehilite"><code>100 | ||
</code></pre></div> | ||
<p>출력 #1</p> | ||
<div class="highlight"><pre class="codehilite"><code>100 is even | ||
</code></pre></div> | ||
<p>입력 #2</p> | ||
<div class="highlight"><pre class="codehilite"><code>1 | ||
</code></pre></div> | ||
<p>출력 #2</p> | ||
<div class="highlight"><pre class="codehilite"><code>1 is odd | ||
</code></pre></div> | ||
<p>※ 2023년 05월 15일 지문이 수정되었습니다.</p> | ||
|
||
|
||
> 출처: 프로그래머스 코딩 테스트 연습, https://school.programmers.co.kr/learn/challenges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
a = int(input()) | ||
if a%2 == 0: | ||
print(a,'is even') | ||
else: | ||
print(a, 'is odd') |