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 | 29 | 30 | 31 |
Tags
- HackCTF
- Python
- php
- Web
- xcz.kr
- N0Named
- MySQL
- cryptography
- 그리디 알고리즘
- writeup
- wargame
- 구현
- misc
- 써니나타스
- Web Hacking
- SuNiNaTas
- Database
- 정렬
- 인코그니토
- C
- Text
- 사칙연산
- Forensics
- 수학
- CTF
- Network
- Incognito
- 백준
- 문자열
- Digital Forensics
Archives
- Today
- Total
보안을 그리다, 훈이
[Baekjoon/Python3] 13420번 사칙연산 본문
[Baekjoon/Python3] 13420번 사칙연산
13420번: 사칙연산
사칙연산은 덧셈, 뺄셈, 곱셈, 나눗셈으로 이루어져 있으며, 컴퓨터 프로그램에서 이를 표현하는 기호는 +, -, *, / 와 같다. 아래는 컴퓨터 프로그램에서 표현한 사칙 연산의 예제이다. 3 * 2 = 6 문
www.acmicpc.net
for i in range(int(input())):
a, b = input().split('=')
if eval(a) == int(b): # eval('str') : compute <-- Vulnerable
print('correct')
else:
print('wrong answer')
'Programming > Python & Data Structures' 카테고리의 다른 글
[Baekjoon/Python3] 13866번 팀 나누기 (0) | 2020.12.07 |
---|---|
(추가예정) [Baekjoon/Python3/C++] 13505번 두 수 XOR (0) | 2020.12.07 |
[Baekjoon/Python3] 13163번 닉네임에 갓 붙이기 (0) | 2020.12.07 |
[Baekjoon/Python3] 12756번 고급 여관 (0) | 2020.12.07 |
[Baekjoon/Python3/Text] 12096번 (0) | 2020.12.07 |
Comments