Solution to the problem number 583 of AceptaelReto - 583.

Any questions do not hesitate to contact.


#include <bits/stdc++.h>
using namespace std;

int main(){
    int cases; scanf("%d",&cases);
    while(cases--){
        long long int comprometedora, otra;
        scanf("%lld %lld",&comprometedora,&otra);
        double percentage = ((comprometedora-(comprometedora+otra)/2) * 100)/((comprometedora+otra)/2);
        printf("%d\n",(long long int)(percentage));
    }
    return 0;
}

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!