Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138988 胡海峰老师 06买鸡腿 C++ Accepted 0 MS 272 KB 435 2025-11-30 19:28:20

Tests(10/10):


Code:

#include <iostream> //designed by hu 2025-10 using namespace std; int main(){ //每只鸡腿a元,小A手中有b元 int a; //价格(鸡腿) int b; //钱 int - integer 整数(不带小数的数) cin >> a >> b; int c; //这是鸡腿的数量 int d; // 送d个鸡腿 c = b/a; //你买的鸡腿; d = c/3; //你买了c个鸡腿,送d个鸡腿 cout<< c + d ; return 0; }