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

22678번 - Do It 스페셜 저지다국어

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

문제

There is sometimes difficulty giving nice backgrounds to contest problems. So let this problem kept this simple - write a program that calculates the value of the following formula where the parameters N, R, Ai, ωi, and φi are all given:

$$ \int_{0}^{R}{\left[\prod_{i=1}^{N}{A_i \sin{\left( ω_it + φ_i \cdot \frac{\pi}{180} \right)}}\right]dt} $$

입력

The input consists of a series of datasets each of which has the following format:

N R
A1 ω1 φ1
A2 ω2 φ2
...
AN ωN φN

The numbers in the input are all integers and satisfy the following conditions: 1 ≤ N ≤ 16, 1 ≤ R ≤ 104, 1 ≤ Ai ≤ 10, 0 ≤ ωi ≤ 100 and 0 ≤ φi ≤ 360.

The end of input is indicated by N = R = 0. This is not part of any dataset and hence should not be processed.

출력

For each dataset, print the result of the integration in a line. The result may be printed with an arbitrary number of fractional digits, but should have a relative or absolute error not greater than 10-8.

제한

예제 입력 1

1 1
1 1 0
0 0

예제 출력 1

0.45969769413186

힌트

출처

Contest > ICPC Japanese Alumni Group > JAG Summer Camp > JAG Summer Camp 2008 Day 4 G번

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

출처

대학교 대회

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

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