Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
130163 胡海峰老师 06买鸡腿 C++ Wrong Answer 1 MS 268 KB 311 2025-09-07 19:20:47

Tests(1/10):


Code:

#include <iostream> using namespace std; int main(){ int a,b ; cin>>a>>b; int res=0,free=0; while( b>=a) { free++; res +=a; b = b -a; if ( free==3) { res++; free=0; } } res = res + b; cout<<res; return 0; }


Run Info:

------Input------
7 39
------Answer-----
6
------Your output-----
40