5501 - I2P_LAB01_1   

Description

雞、兔共有a隻腳,若雞與兔的頭數互換,則共有b隻腳,請問雞、兔原各有多少頭?

Hint:

#include 

int main(void)
{
    int a, b;  /* input */
    int x, y;  /* x:雞的個數  y:兔的個數 */
    
    /* ??? */

    printf("%d %d", x, y);

    return 0;
}

Input

正整數a, b

Output

 雞的個數、兔的個數 (注意順序)

Sample Input  Download

Sample Output  Download

Tags




Discuss