Anegan is a member of a programming competition site, Awesome Coder. Each member of the Awesome Coder is assigned two values: Inner Rating and Displayed Rating.
The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 × (10−K) when the member has participated in K contests.
Anegan has participated in N contests, and his Displayed Rating is R. Find his Inner rating.
Input:
Only line of input has two values N R of type integer separated by a space.
Output:
Print the Inner Rating.
#include <stdio.h> int main() { int n,r,i; scanf("%d %d",&n,&r); if(10>=n){ i=r+100*(10-n); printf("%d",i);} else printf("%d",r); return 0; }
INPUT_1:
7 2919
OUTPUT
3219
INPUT_2:
22 3051
OUTPUT:
3051
Morae! Q
- Find a triplet such that triplet is minimum of all the triplets.
- Rearrange characters in a string such that no two adjacent are same.
- Return the coordinates of all cells in matrix sorted by their distance.
- Function to verify the ISBN number from the book.
- Find out the absolute difference of values of two array integers.
- Rotate the array in the right direction by K steps.
- Find the sequence of moves that wins the game, collect exactly G coins!.
- Calculate the sum of boundary elements of a matrix.
- Find the total number of ways to reach the tree house.
- Compute profit and loss of a product.
- Find the total expense of purchased items.
- Determine the maximum sequence weight.
- Find the person’s birth year is a leap year or not.
- Find the inner rating with the displayed rating.
- Find if angles are valid to form a triangle.
- Find out the winner of the game from the given statistics.
- Verify the tag to determine if one needs to arrest or allow the vehicle.
- Find the largest hexadecimal number.
- Group up all anagrams together from given words.
- Return all anagrams from the given words.