LightOJ - 1001 Opposite Task

Description

This problem gives you a flavor the concept of special judge. That means the judge is smart enough to verify your code even though it may print different results. In this problem you are asked to find the opposite task of the previous problem.

To be specific, I have two computers where I stored my problems. Now I know the total number of problems is n. And there are no duplicate problems and there can be at most 10 problems in each computer. You have to find the number of problems in each of the computers.

Since there can be multiple solutions. Any valid solution will do.

Input

Input starts with an integer T (≤ 25), denoting the number of test cases.

Each case starts with a line containing an integer n (0 ≤ n ≤ 20) denoting the total number of problems.

Output

For each case, print the number of problems stored in each computer in a single line. A single space should separate the non-negative integers.

Sample Input

3

10

7

7

Sample Output

0 10

0 7

1 6


題目的sample output貌似有問題,不過我這個提交就可以了,根據題意和輸出大概意思是 b是先解決問題,如果b的解決問題大於10,就給a 10道,剩下給b


#include <iostream>

using namespace std;

int main(){
    int T;
    while(cin>>T){
        while(T--){
            int num;
            cin>>num;
            int a = 0, b = num;
            if(num > 10){
                a = 10; b = num-10;
            }
            cout<<a<<" "<<b<<endl;
        }
    }
}


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章