‘totalSalary’ = ‘basic’ + ‘hra’ + ‘da’ + ‘allowance’ - ‘pf’
‘hra’ = 20% of ‘basic’
‘da’ = 50% of ‘basic’
‘allowance’ = 1700 if grade = ‘A’
‘allowance’ = 1500 if grade = ‘B’
‘allowance’ = 1300 if grade = ‘C' or any other character
‘pf’ = 11% of ‘basic’.
Round off the ‘totalSalary’ and then print the integral part only.
'x.5' type values will always be round up, for example, 1.5, 2.5 will be round off to 2, 3 respectively.
The first line of input contains an integer ‘T’ denoting the number of test cases. Then each test case follows:
The first and the only line of each test contains an integer denoting ‘basicSalary’ and an Uppercase character representing Grade (separated by space).
The output will contain a single integer representing Total Salary.
The output of each test case will be printed on a separate line.
You do not need to print anything, it has already been taken care of. Just implement the given function.
0 <= 'basicSalary' <= 7 * (10 ^ 5)
Time Limit: 1 sec.
Use simple math operations.
Special Numbers
Minimum Operations To Make Array Equal
Ninja's Encryption
Minimum Window Subsequence
Minimum Window Subsequence
Minimum Window Subsequence
Minimum Window Subsequence
Minimum Window Subsequence
Minimum Window Subsequence
Fizzbuzz Problem