Menu Close

Find the inner rating with the displayed rating

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