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>
using namespace std;

int main(void){
    long long int a,b,c,day=0,cur=0;
    cin >> a>>b>>c;
    while(cur<c){
        day++;
        cur+=a;
        if(day%7==0&&day!=0) cur+=b;
    }
    cout << day << endl;
}

C++: #include <iostream>

int getMinIteration(const int& a, const int& b, const int& c) {
	int ret = 0;
	int temp_total = 0;

	if (a <1 || b < 0|| c < 1) {
		std::cout <<"a or b or c exceed min"<< std::endl;
		return ret;
	}
	if ( 1000 < a || 1000 < b || 1000000 < c ) {
		std::cout<< "a or b or c exceed max"<< std::endl;
		return ret;
	}

	do {
		ret += 1;
		temp_total += a;
		if (ret%7 == 0) { temp_total += b; }
	} while (temp_total<c);
	return ret;
}


int main() {

	int i_a, i_b, i_c;
	std::cin >> i_a;
	std::cin >> i_b;
	std::cin >> i_c;

	auto min = getMinIteration(i_a, i_b, i_c);
	std::cout << min<<std::endl;

	return 0;
}

C++: #include <iostream>
#include <string.h>
using namespace std;
int main(){
    int A, B, C;
    int t;
    int D;
    cin>>A>>B>>C;
    t = 0;
    D = 7 * A;
    while(C>0)
    {
        if (C-D>0)
        {
            C = C-D-B;
            t += 7;
        }
        else
        {
            C -=A;
            t +=1;
            
        }
    }
    std::cout << t << std::endl;
}

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

int main(void){
  int a,b,c,w; // w:weekly total
  int ans,d;
  
  cin >> a >> b >> c;
  w = a*7+b;
  while (c>=w){
    ans += 7;
    c -= w;
  }
//  cout << ans << " " << c << endl;
  d=1;
  while (c>0){
    c -= a;
    if (d++==7) c -= b;
    ans++;
  }
  cout << ans << endl;
  return 0;
}

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

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

	int m = 0, day = 0;
	while(m < C) {
		day++;
		m += A;
		if(day%7 == 0) m += B;
	}
	cout << day << endl;
}