|
Time |
Memory |
| Case 1 |
1 sec |
32 MB |
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
雞的個數、兔的個數 (注意順序)
Tags