Skip to content

Commit

Permalink
[level 0] Title: 홀짝 구분하기, Time: 12.63 ms, Memory: 7.48 MB -BaekjoonHub
Browse files Browse the repository at this point in the history
  • Loading branch information
boyamie committed Jun 12, 2024
1 parent 0fb3f48 commit 992252a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
52 changes: 52 additions & 0 deletions 프로그래머스/0/181944. 홀짝 구분하기/README.md
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
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')

0 comments on commit 992252a

Please sign in to comment.