Sunday, July 17, 2016

UVA 11388 Solution

Unknown
#include<cstdio>
using namespace std;

int main()
{
    int tc;
    scanf("%d",&tc);
    while (tc--)
    {
        int g,l;
        scanf("%d%d",&g,&l);
        if (l%g==0) printf("%d %d\n",g,l);
        else printf("-1\n");
    }
    return 0;
}

Unknown

Studying at Shahjalal University of Science and Technology, Sylhet.

0 comments:

Post a Comment

Coprights @ 2016,