Problem:
Score : 100 points

Problem Statement

How many hours do we have until New Year at M o'clock (24-hour notation) on 30th, December?

Constraints

1≤M≤23

M is an integer.

Input

Input is given from Standard Input in the following format:

M

Output

If we have x hours until New Year at M o'clock on 30th, December, print x.

Sample Input 1

21

Sample Output 1

27

We have 27 hours until New Year at 21 o'clock on 30th, December.

Sample Input 2

12

Sample Output 2

36

Solution in C (Clang 3.8.0) (judge verdict: Wrong Answer)

#include <stdio.h>
int main(){
  int a,b,c,d,e,f;
  char ch,ch2;
  c =scanf("%d%d",&a,&b);
  d = scanf("%d%c%d",&e,&ch,&f);
 int count1,count2;
 for(int i =0;i<a;i++){
   e =e/10;
   count1 += 1;
 }
 for(int i =0;i<b;i++){
   f =f/10;
   count2 += 1;
 }
 
  while(e>0){
    e = e/10;
    count1 +=1;
  }
  while(f>0){
    f =f/10;
    count2 += 1;
    }
  if(d!=3) {
      printf("No");
    }
else{
  
  if(a ==count1 &&b ==count2){
    printf("Yes");
  }else{
    printf("No");
  }
}

  return 0;
}