영어도 없고 폴란드어만 있고 브5라서 풀어봤는데 피봄;;
구글 번역기로 영어로 돌려보면(한글이 더 번역똥이라)
문제
Julka surprised her teacher in kindergarten yesterday by solving the following puzzle:
Klaudia and Natalia have 10 apples together, but Klaudia has 2 apples more than Natalia. How many apples does each girl have?
Julka answered without thinking: Klaudia has six apples, while Natalia has four apples.
The educators decided to check if Julka's answer was not accidental and repeated the puzzle, each time increasing the number of apples in the task. Julia always answered correctly. The surprised tutor wanted to continue Julka's "study", but with very large numbers she could not solve the puzzle quickly. Help your kindergarten teacher and write a program that will suggest her solutions.
Write a program that:
reads (from the standard input) the number of apples that both girls have together and how many more apples Klaudia has,
will calculate how many apples Klaudia has and how many apples Natalia has,
writes the result (to the standard output).
입력
The entrance consists of two lines. The first line contains the number of all apples owned by the girls, while the second line shows the number of how many apples Klaudia has. Both numbers are integer and positive. It is known that girls have no more than 10100 (one and one hundred zeros) apples together. As you can see, apples can be very tiny.
https://www.acmicpc.net/problem/8437
/2 말고 //2 - dc App
ㄷㄷ 소름돋네 파이썬은 교양으로 들은게 전부라 실력이 ㅎㅌㅊ임 감사감사
근데 // 2 랑 int( ? / 2) 랑 같지않음?? 똑같이 몫 구하는 연산인데
입력이 10의 100승까지 들어올 수 있는 문제인데 실수형 연산을 사용하면 정밀도 때문에 오차가 생김
그렇기 때문에 파이썬 나눗셈에서 정수연산을 강제해야함(//). C언어로 풀려면 int 범위를 넘으니까 아마 Bigint 구현해서 풀어야할듯
고마버 갤주형