← Back to List

16785번: ソーシャルゲーム (Social Game) ↗

Solutions

C++14
218 B | 218 chars
#include <iostream>
using namespace std;
int A,B,C,S,K;
int main()
{
    cin>>A>>B>>C;
    while(S<C)
    {
        K++;
        S+=A;
        if(K!=0&&K%7==0)
        {
            S+=B;
        }
    }
    cout<<K;
}