문제 링크 4766번: 일반 화학 실험 입력은 동혁이가 측정한 혼합물의 온도가 순서대로 주어진다. 온도는 -10도와 200도 사이이고, 소수점 둘째자리까지 적혀져 있을 수도 있다. 마지막 측정 후에는 999가 주어진다. 동혁이는 온도를 www.acmicpc.net 문제 풀이 이 문제는 이전 값과 다음 값의 차이를 999의 입력값이 나올 때 까지 출력해주면 된다. 주의할 점은 소숫점 두 번째 자리까지 출력이라는 점이다. 정답 코드 temp = float(input()) while True : next = float(input()) if next == 999 : break print("{:.2f}".format(next - temp)) temp = next
문제 링크 4635번: Speed Limit The input consists of one or more data sets. Each set starts with a line containing an integer n, 1 ≤ n ≤ 10, followed by n pairs of values, one pair per line. The first value in a pair, s, is the speed in miles per hour and the second value, t, is t www.acmicpc.net 문제 풀이 단순한 사칙연산 문제이다. 다만, 입력값으로 주어지는 t가 누적값이므로 주의하자. 정답 코드 while True : n = int(input()) if n == -1 : break..