为什么我错了,哪位大佬帮忙看看?

lyh098 仙辞 2024-02-05 10:41:13 23

#include using namespace std;

int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { for (int j = 0; j <= x; j++) { if (i + j == x && i * 2 + j * 4 == y) { cout << i << endl << j; return 0; } } } return 0; }

{{ vote && vote.total.up }}

共 3 条回复

root 站长

继续分析下去

root 站长

求最少的动物,肯定是兔子,因为兔子有 4 条腿;

lzx11 黄金1

我不知道