Go: package main

import (
	"fmt"
)

func calcDay(daily, bonus, req int) int {
	fullWcoin   := 7 * daily + bonus	//"週給"
	sixDaycoin := 6 * daily				//6日目まででもらえるコイン

	week := req / fullWcoin //必要満週数
	day := 0
	rem  := req % fullWcoin
		
		if sixDaycoin < rem && rem < fullWcoin {
			week++
		} else {
			day = rem / daily
				if rem % daily > 0 {
					day++
				}
		}

	return 7 * week + day
}

func main() {
	var daily, bonus, req int
		fmt.Scanf("%d %d %d",&daily ,&bonus ,&req)
		fmt.Printf("%d\n",calcDay(daily, bonus, req))
}

C++: #include <bits/stdc++.h>
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; i++)
using namespace std;
int dy[4] = { 1, 0, -1, 0 }, dx[4] = { 0, 1, 0, -1 };
const ll MOD = 1e9 + 7;
const ll INF = 1e9;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b, c;
    cin >> a >> b >> c;
    int sum = 0;
    int day = 0;
    while (sum < c) {
        day++;
        sum += a;
        if (day % 7 == 0)
            sum += b;
    }
    cout << day << endl;
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int A,B,C,k = 0,i,m = 0;
cin>>A>>B>>C;
while(1){
k = m/7;
i = A * m + B * k;
if(i >= C)
break;
m++;
}
cout<<m<<endl;
return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
    

int main(){
    int ans=0,money=0;
    int a,b,c;
    cin >> a>>b>>c;

    while (money < c){
        ans++;
        if(ans%7==0){
            money += a+b;
        }else{
            money += a;
        }
    }
    //cout <<fixed<<setprecision(16)<< << endl;
    cout << ans << endl;

    //if(flag==1)cout << "Yes" <<endl;
    //else cout << "No" <<endl;
    
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a,b,c,o=0;
    cin>>a>>b>>c;
    for(;;){
        for(int i=0;i<7;i++){
            if(c<=0)break;
            c=c-a;
            o++;
        }
        if(c<=0)break;
        c=c-b;
    }
    cout<<o<<endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    int A,B,C;
    cin>>A>>B>>C;
    int day=0;
    int count=0;
    int ans=0;
    while(1){
        if(count>=C)break;
        ans++;
        day++;
        count=count+A;
        if(day==7){day=0;count=count+B;}
    }
    cout<<ans<<endl;
    
    return 0;
    
}

C++: #include <iostream>
#include <stdio.h>

int main()
{
    int daily_point = 0;
    int weekly_point = 0;
    int goal_point = 0;
    
    std::cin >> daily_point;
    std::cin >> weekly_point;
    std::cin >> goal_point;
    
    const int total_weekly_point = daily_point * 7 + weekly_point;
    
    const int weekly_count = goal_point / total_weekly_point;
    
    const int nokori_point = goal_point - (total_weekly_point * weekly_count);
    int daily_count = (nokori_point) / daily_point + ((nokori_point) % daily_point == 0 ? 0 : 1);
    if(nokori_point > daily_point * 7)
    {
        daily_count = 7;
    }
    printf("%d\n",weekly_count * 7 + daily_count);
    
    return 0;
}

C++: #include <iostream>

using namespace std;

template <typename T>
T cin2var()
{
    T val;
    cin >> val;
    return val;
}

int main()
{
    const int A(cin2var<int>());
    const int B(cin2var<int>());
    const int C(cin2var<int>());
    int coin = 0;
    int day = 1;
    for (; coin < C; ++day) {
        coin += A;
        if (day % 7 == 0) {
            coin += B;
        }
    }
    --day;
    cout << day << endl;
    return 0;
}

C++: //id:miiifa (AOJ,PEどちらも)
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF= 1LL << 60;
#define REP(i,n) for(ll i=0; i<n; i++)
#define FOR(i,a,n) for(ll i=a; i<n; i++)
int main(){
    int a,b,c;
    cin >> a >> b >> c;
    int m=0;
    int i=1;
    while(1){
        m+=(i%7==0)?a+b:a;
        // cout << m << endl;
        if(m>=c){
            cout << i << endl;
            return 0;
        }
        i++;
    }
}

C++: #include<stdio.h>

int main(void){
int A,B,C,days,coin;

scanf("%d %d %d",&A,&B,&C);
days=0;
coin=0;
while( coin < C){
days++;
coin = coin + A ;
if(days % 7 == 0){ coin = coin + B;}
}
printf("%d\n",days);
return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,count=0;
  cin>>A>>B>>C;
  while(1){
    count+=1;
    C = C - A;
    if(count%7==0) C = C - B;
    if(C <= 0) break;
    }
  cout<<count<<endl;
  return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

#define int long long
#define endl '\n'
#define MOD 1000000007
#define maxn 100010

void solve() {
    int a, b, c;
    cin >> a >> b >> c;

    int ans = 0;
    for (int i = 1;; i++) {
        ans += a;
        if (i % 7 == 0)
            ans += b;
        if (ans >= c) {
            cout << i << endl;
            return;
        }
    }
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
//    cin >> t;

    while (t--)
        solve();
    return 0;
}

C++: #include<bits/stdc++.h>

#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-8)
#define equals(a,b) (fabs((a)-(b))<EPS)

using namespace std;

typedef long long ll;

bool LT(double a,double b) { return !equals(a,b) && a < b; }
bool LTE(double a,double b) { return equals(a,b) || a < b; }


void compute() {

}

int main() {
  int A,B,C;
  cin >> A >> B >> C;
  int cnt = 0, ans = 0;
  while( C > 0 ) {
    ++cnt;
    C -= A;
    if( cnt && cnt % 7 == 0 ) C -= B;
    ++ans;
  }
  cout << ans << endl;
  compute();
  return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main() {
	int a, b, c;
	scanf("%d %d %d", &a, &b, &c);
	int i,f;
	i = 0;
	f = 0;
	while (f < c) {
		i++;
		f = f + a;
		if (i % 7 == 0)f = f + b;
	}
	printf("%d\n", i);
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
typedef long long int ll;
using namespace std;

int main(){
	int a,b,c; cin >>a>>b>>c;
	int ans=c/(7*a+b)*7+min(7,(c-c/(7*a+b)*(7*a+b)+(a-1))/a);
	cout << ans << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;

template <typename T1, typename T2>
long RoundUp(T1 C, T2 A){
	if(C%A != 0){
		return C/A + 1;
	}else{
		return C/A;
	}
}

int main(){
	long A, B;
	long C;
	cin >> A >> B >> C;

	long OneWeekCoins = 7*A+B;	// 7日間連続ログインした際の獲得コイン数
	long Set1 = C/OneWeekCoins;
	long Set2 = Set1 + 1;
	long rest1 = C - Set1*OneWeekCoins;
	long ans1 = RoundUp(rest1, A) + 7*Set1;
	long ans2 = 7*Set2;

	if(ans1 < ans2){
		cout << ans1 << endl;
	}else{
		cout << ans2 << endl;
	}

}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
    int a,b,c;
    cin >> a >> b >> c;
    int coin = 0;
    for(int i=1; ; i++){
        coin += a;
        if(i%7 == 0) coin += b;
        if(coin >= c){
            cout << i << endl;
            break;
        }
    }
    return 0;
}

C++: #include <iostream>

#define DAY 7 

using namespace std;

int main(void)
{
  int A, B, C;
  cin >> A >> B >> C;

  int coin = 0;
  int i = 0;
  while(coin < C) {
    i++;
    coin += A;
    if(i % DAY == 0) coin += B;
  }

  cout << i << endl;

  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>

static const int MOD = 1000000007;
using ll = int64_t;
using u32 = uint32_t;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    ll a, b, c;
    cin >> a >> b >> c;
    ll ng = 0, ok = INF<int>;
    while(ok-ng>1){
        int mid = (ok+ng)/2;
        ll k = mid*a+(mid/7)*b;
        (k >= c ? ok : ng) = mid;
    }
    cout << ok << "\n";
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
  int a, b, c;
  cin >> a >> b >> c;

  int day = 0;
  int sum = 0;

  while (sum < c) {
    ++day;
    sum += (day % 7 == 0) ? a + b : a;
  }

  cout << day << endl;
}