목록분류 전체보기 (373)
Silver Library (Archived)
Use 'map' to its initial list. This allows programmer to let list acts multiple value aggregately. As long as I know how map works out, I can finally achieve the simplicity (from refactoring process) Error 1. a,b,c = input().split() a = int(a) b = int(b) c = int(c) print((A+B)%C, ((A%C) + (B%C))%C, (A×B)%C, ((A%C) × (B%C))%C) Result = Runtime error (NameError) Note. I guess this means 'as long a..
Incorrect 1. a,b = input().split() a = float(a) b = float(b) print(a+b) print(a-b) print(a*b) print(a/b) print(a%b) Incorrect 2. a,b = input().split() a = float(a) b = float(b) print(a+b, a-b, a*b, a/b, a%b) Incorrect 3. a,b = input().split() a = int(a) b = int(b) print(a+b, a-b, a*b, a/b, a%b) Correct 1. a,b = input().split() a = int(a) b = int(b) print(a+b, a-b, a*b, int(a/b), a%b) Note: Let c..
www.acmicpc.net/problem/1008 1008번: A/B 두 정수 A와 B를 입력받은 다음, A/B를 출력하는 프로그램을 작성하시오. www.acmicpc.net Solution 1 a,b = input().split() a = float(a) b = float(b) print(a/b) Solution 2 a,b = input().split() a = int(a) b = int(b) print(a/b) Note: I thought solution 2 would be wrong, but this is the correct one too. Note 2: Guess I need some practice to explain how I could solve this (like the link bel..
Title: A-B Problem 1001. Requirement. 3 2 then result should be 1. Solution a,b = input().split() a = int(a) b = int(b) print(a-b) Other guy solved this as follows: Solution a, b = input().split() print(int(a) - int(b)) blog.xeros.dev/88 백준알고리즘 1001번 파이썬 풀이 Problem Introduction 해당 문제에서 요구하는 바는 각각 정수 a와 b를 입력받고 입력받은 정수 a, b를 뺀 값을 출력하는것이다. Solve a, b = input().split() print(int(a) - int(b)) 완성된 코드..