목록전체 글 (159)
할껀하고놀자
import sys sys.stdin = open('1.txt') r="" num = int(input()) for _ in range(num): r += input().lower()+'\n' print(r) 다른 사람 풀이 import sys n = int(sys.stdin.readline()) for _ in range(n): s = sys.stdin.readline().rstrip() print(s.lower())
num1 = int(input()) operator = input() num2 = int(input()) if operator=='*': print(num1*num2) else: print(num1+num2) print(eval(input()+input()+input())) 다른사람 풀이
import sys sys.stdin = open('1.txt') n = int(input()) for i in range(n): li = input().split(' ') flag = False if li[1]=='*': tmp = int(li[0])*int(li[2]) if tmp == int(''.join(li[-1:])): flag=True elif li[1]=='+': tmp = int(li[0])+int(li[2]) if tmp == int(''.join(li[-1:])): flag=True elif li[1]=='-': tmp = int(li[0])-int(li[2]) if tmp == int(''.join(li[-1:])): flag=True elif li[1]=='/': tmp = int..