Problem:
Score : 100 points

Problem Statement

You are given two positive integers a and b.
Let x be the average of a and b.
Print x rounded up to the nearest integer.

Constraints

a and b are integers.

1 \leq a, b \leq 100

Input

Input is given from Standard Input in the following format:

a b

Output

Print x rounded up to the nearest integer.

Sample Input 1

1 3

Sample Output 1

2

The average of 1 and 3 is 2.0, and it will be rounded up to the nearest integer, 2.

Sample Input 2

7 4

Sample Output 2

6

The average of 7 and 4 is 5.5, and it will be rounded up to the nearest integer, 6.

Sample Input 3

5 5

Sample Output 3

5

Solution in C (GCC 5.4.1) (judge verdict: Wrong Answer)

#include <stdio.h>
#include <string.h>

void sort_str(char *s){
    int minc;
    int i,j;
    char c;
    char *tmp = s;

    for(i=0;i<strlen(s);i++){
        minc = i;
        for(j=i;j<strlen(&tmp[i]);j++){
            if(tmp[j] < tmp[minc]){
                minc = j;
                continue;
            }
        }
        c = s[i];
        s[i] = s[minc];
        s[minc] = c;
    }
}

int main(){
    char s[100],t[100];
    int i,j,min_len,s_len,t_len;

    scanf("%s %s",s,t);

    sort_str(s);
    sort_str(t);

    s_len = strlen(s);
    t_len = strlen(t);

    min_len = s_len < t_len ? s_len : t_len;

    printf("%s %s\n",s,t);

    i=0;
    j=t_len-1;

    while(i<min_len){
        if(s[i] > t[j]){
            printf("No\n");
            return 0;
        }else if(s[i] == t[j]){
            i++;
            j--;
        }else{
            printf("Yes\n");
            return 0;
        }
    }

    printf("No\n");

    return 0;
}