Logo
(追記) (追記ここまで)

22295번 - twOBoOgEr 다국어언어 제한함수 구현

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 512 MB198574727.011%

문제

Write a function P6:

  • There are two objects A, B on a line and a wall is placed at left. A is closer than B to the wall. Initially, A and B are static and each has 1 kg, $n$ kg. Suddenly, B moves toward A with speed 1 m/s and collides. The collision is elastic.
  • input parameter: a positive integer $n$ ($n \le 10^6$)
  • return value: the collision number between A and B or A and wall
  • Hint: When two objects with mass $m_1$ and $m_2$ collide with the initial velocity (not speed) $v_{1i}$ and $v_{2i},ドル the final velocity $v_{1f}$ and $v_{2f}$ satisfy the equation $m_{1}v_{1i} + m_{2}v_{2i} = m_{1}v_{1f} + m_{2}v_{2f}$. And in elastic collision, the kinetic energy is conserved.

입력

출력

제한

힌트

출처

School > 한국과학영재학교 > 2021 Spring CS1 Final Mock Exam 6번

  • 문제를 만든 사람: tbn23

제출할 수 있는 언어

PyPy3

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /