시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 270 168 141 63.514%

문제

대부분의 자전거 속도계는 앞 포크에 설치된 홀 효과 센서로 동작한다. 자석이 앞 바퀴의 포크중 하나에 부착되어, 홀 효과를 이용해 속도계가 바퀴의 회전수를 측정한다. 따라서 바퀴의 지름을 안다면 회전수를 통해 이동 거리를 측정할 수 있다. 또한 바퀴가 회전하는 동안 걸린 시간을 안다면 평균 속도 역시 알 수 있다.

바퀴의 지름, 회전수, 걸린 시간이 주어졌을 때, 총 이동 거리와 평균 속도를 계산하여라. 앞바퀴는 땅에서 떨어지거나 미끄러지거나 공전하지 않았다고 가정한다.

이동 거리의 단위는 miles이고, 평균 속도의 단위는 miles/hour 이다.

입력

입력은 여러 줄의 데이터로 구성된다. 각 데이터는 지름, 회전수, 시간이 공백으로 구분되어 주어진다. 지름은 inch단위의 실수이며, 회전수는 정수이다. 시간은 초단위의 실수로 주어진다. 입력은 회전수가 0이면 끝난다. 실수는 소수점 셋째자리이하까지 주어진다.

출력

각각의 데이터에 대해 다음을 출력한다

Trip #N: distance MPH

N은 각각의 데이터 번호를 출력해야 하며, distance는 총 거리(Miles)를 소수 둘째 자리까지 반올림하여 나타내며, MPH는 평균 속도(miles per hour)를 소수 둘째 자리까지 반올림하여 나타낸다. 회전수가 0인 데이터에 대해서는 출력하지 않는다.

예제 입력 1

26 1000 5
27.25 873234 3000
26 0 1000

예제 출력 1

Trip #1: 1.29 928.20
Trip #2: 1179.86 1415.84

힌트

  • π의 값은 3.1415927을 사용하면 된다.
  • 1마일은 5280피트이다.
  • 1피트는 12인치이다.
  • 1시간은 60분이다.
  • 1분은 60초이다.
  • 1펄롱은 201.168미터이다.
W3sicHJvYmxlbV9pZCI6IjI3NjUiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM3OTBcdWM4MDRcdWFjNzAgXHVjMThkXHViM2M0IiwiZGVzY3JpcHRpb24iOiI8cD5cdWIzMDBcdWJkODBcd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zZXQsIHByaW50OjxcL3A+XHJcblxyXG48cD5UcmlwICNOOiBkaXN0YW5jZSBNUEg8XC9wPlxyXG5cclxuPHA+T2YgY291cnNlIE4gc2hvdWxkIGJlIHJlcGxhY2VkIGJ5IHRoZSBkYXRhIHNldCBudW1iZXIsIGRpc3RhbmNlIGJ5IHRoZSB0b3RhbCBkaXN0YW5jZSBpbiBtaWxlcyAoYWNjdXJhdGUgdG8gMiBkZWNpbWFsIHBsYWNlcykgYW5kIE1QSCBieSB0aGUgc3BlZWQgaW4gbWlsZXMgcGVyIGhvdXIgKGFjY3VyYXRlIHRvIDIgZGVjaW1hbCBwbGFjZXMpLiBZb3VyIHByb2dyYW0gc2hvdWxkIG5vdCBnZW5lcmF0ZSBhbnkgb3V0cHV0IGZvciB0aGUgZW5kaW5nIGNhc2Ugd2hlbiByZXZvbHV0aW9ucyBpcyAwLjxcL3A+XHJcbiIsImhpbnQiOiI8dWw+XHJcblx0PGxpPkZvciBwIHVzZSB0aGUgdmFsdWU6IDMuMTQxNTkyNy48XC9saT5cclxuXHQ8bGk+VGhlcmUgYXJlIDUyODAgZmVldCBpbiBhIG1pbGUuPFwvbGk+XHJcblx0PGxpPlRoZXJlIGFyZSAxMiBpbmNoZXMgaW4gYSBmb290LjxcL2xpPlxyXG5cdDxsaT5UaGVyZSBhcmUgNjAgbWludXRlcyBpbiBhbiBob3VyLjxcL2xpPlxyXG5cdDxsaT5UaGVyZSBhcmUgNjAgc2Vjb25kcyBpbiBhIG1pbnV0ZS48XC9saT5cclxuXHQ8bGk+VGhlcmUgYXJlIDIwMS4xNjggbWV0ZXJzIGluIGEgZnVybG9uZy48XC9saT5cclxuPFwvdWw+XHJcbiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

ICPC > Regionals > North America > Greater New York Region > 2003 Greater New York Programming Contest A번