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

33192번 - Divar’s Salaries 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB27718812763.819%

문제

Amin works in the financial department of Divar company. As part of his responsibilities, he needs to prepare the salary payment list for the company’s employees. The salary of each employee is calculated based on a base hourly rate of $x$ Rials. However, the actual pay rate varies depending on the type of working hours:

  • Normal Working Hours: Paid at the standard rate of $x$ Rials per hour.
  • Overtime Hours: Any hours worked beyond the standard 140ドル$ hours per month are compensated at 1ドル.5$ times the base rate.
  • Holiday Hours: Hours worked on recognized holidays are paid at twice the base rate, regardless of whether they fall within or beyond the standard 140ドル$ hours.

Holiday hours always take precedence, and employees are compensated at the doubled rate for these hours, irrespective of the standard working hour limits.

Amin’s task is to calculate the total monthly salary for each employee, taking into account their normal hours, overtime hours, and holiday hours. Help Amin determine the payment for all the employees in the company.

입력

The first line of input contains a single integer $n$ (1ドル \le n \le 1,円 000$), representing the number of employees in the company. The following $n$ lines each provide three integers $x,ドル $k$ and $h,ドル which describe the details for each employee:

  • $x$ (100ドル \le x \le 10^6$): The hourly wage in Rials, which is always a multiple of 10ドル$.
  • $k$ (0ドル \le k \le 480$): The total number of hours worked during the current month.
  • $h$ (0ドル \le h \le k$): The number of holiday hours worked.

출력

In the output, print the total monthly payment for each employee on a separate line. The payment must be formatted with commas separating every three digits, starting from the right.

제한

예제 입력 1

3
500 10 0
200 190 15
10000 150 20

예제 출력 1

5,000
44,500
1,700,000

힌트

출처

ICPC > Regionals > Asia West Continent > Iran > 2024 ICPC Asia Tehran Regional Contest B번

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

출처

대학교 대회

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

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