Translate Your Own Language

Friday, November 9, 2018

Lightoj Solution 1001 - Opposite Task

smittop.blogspot.com

Problem Link - http://www.lightoj.com/volume_showproblem.php?problem=1001

Solution:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#include<stdio.h>
int main(){
    int  t,i,n;
    scanf("%d",&t);
    for(i=0;i<t;i++)
    {
        scanf("%d",&n);

        if(n>10)
        {
            printf("%d %d\n",n-10,n-(n-10));

        }else{
            printf("0 %d\n",n);
        }

    }

return 0;
}

Happy coding....




No comments:

Post a Comment