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 <iostream>
using namespace std;
int main(void){
    int A,B,C,x,y,w;
    cin>>A>>B>>C;
    if(C<A*7){if(C%A==0){cout<<C/A<<endl;}else{
     cout<<C/A+1<<endl;}   
    }
    if(C>A*7){
        x=C/(7*A+B);
        y=C-x*(7*A+B);
        if(y%A==0){w=y/A;}else{w=y/A+1;}
        
        cout<<x*7+w<<endl;
    }
}

C++: #include <iostream>
using namespace std;
int main(void){
    int A,B,C;
    int cnt=0,sum=0;
    
    cin>>A;
    cin>>B;
    cin>>C;
    
    while(sum<C){
        cnt++;
        sum+=A;
        if(cnt!=0 && cnt%7==0){
            sum+=B;
        }
    }
    
    cout<<cnt<<"\n";
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<map>
#include<stack>
#include<cmath>
#include<iomanip>
#include<set>
#include<numeric>
#include<sstream>
#include<random>
#include<cassert>
#include<list>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rrep(i, st, n) for (int i = st; i < n; ++i)
using pii = pair<int, int>;
const int inf = 1e9 + 7;
int dy[] = {1, 1, 0, -1, -1, 0};
int dx[] = {1, 0, -1, -1, 0, 1};
#define ceil(a, b) a / b + !!(a % b)

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

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


int main(){
	ll A,B,C,S;
	cin >> A >> B >> C;
	S = 7*A+B;
	ll ans = min( (C/S)*7 + (C%S+A-1)/A, (C+S-1)/S * 7);
	cout << ans << endl;
}

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

using namespace std;

int main() {
	int a, b, c, cnt, sum;

	cnt = 0;
	sum = 0;
	cin >> a >> b >> c;
	while (true) {
		if (sum >= c) {
			break;
		}
		sum += a;
		++cnt;
		if (cnt % 7 == 0) {
			sum += b;
		}
	}
	cout << cnt << endl;

	return 0;
}

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

using namespace std;

int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int ans = 0, cnt = 0;
  while (0 < c) {
    c -= a;
    cnt++;
    ans++;
    if (cnt == 7) c -= b, cnt = 0;
  }
  cout << ans << endl;

  return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
    int a,b,c,sum = 0,count = 0;
    cin >> a >> b >> c;
    while(sum < c){
        ++count;
        sum += a;
        if((count % 7) == 0) sum += b;
    }
    cout << count << endl;
}

C++: #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define max0(a,b,c) max(max(a,b),c)
#define min0(a,b,c) min(min(a,b),c)
#define ft first
#define sc second
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define mod 1000000007
using namespace std;
using Graph = vector<vector<int>>;
typedef long long lint;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ldouble;
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<ull> ulvec;
typedef vector<double> dvec;
typedef vector<pair<int,int>> pvec;
typedef vector<pair<ll,ll>> plvec;
typedef vector<tuple<ll,ll,ll>> tvec;
typedef vector<string> svec;

int main(){
    ll a,b,c,cnt=0;
    cin>>a>>b>>c;
    ll ans=0;
    while(cnt<c){
        ans++;
        cnt+=a;
        if(ans%7==0) cnt+=b;
    }
    cout<<ans<<endl;
}

C++: #include<cstdio>
#include<functional>
#include<algorithm>
#include<cstring>
using namespace std;
void func(int);
int main(void)
{
	int a,b,c,i,cnt;
	scanf("%d %d %d",&a,&b,&c);
	cnt=0;
	i=0;
	while(cnt<c)	{
		i++;
		cnt+=a;
		if(i%7==0)	cnt+=b;
	}
	printf("%d\n",i);
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
signed main() {
	int a, b, c; cin >> a >> b >> c;
	int ans = (c / (a * 7 + b)) * 7; c %= (a * 7 + b);
	cout << ans + min((c + a - 1) / a, 7) << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a,b,c,sum=0,day=0,i;
    cin>>a>>b>>c;
    while(sum<c){
        sum+=a;
        day++;
        i++;
        if(i==7){
            i=0;
            sum+=b;
        }
    }
    cout<<day<<endl;
}

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

using namespace std;

int main()
{
	int a,b,c;
	cin >> a >> b >> c;
	int cnt=0;
	int now=0;
	while(true)
	{
		cnt++;
		now+=a+(cnt%7==0 ? b:0);
		if(now>=c)break;
	}
	cout << cnt << endl;
}

C++: #include<iostream>
using namespace std;
int main(){
    int a,b,c,i;
    int sum=0;
    cin>>a>>b>>c;
    for(i=1;sum<c;i++){
        sum+=a;
        if(i%7==0)
            sum+=b;
    }
    cout<<i-1<<endl;
}

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

int main(){
    int A, B, C;

    cin >> A >> B >> C;

    int week=0;
    int day=0;

    while(7*A+B<=C){
        C-=7*A+B;
        week++;
    }
    
    while(day<7 && C>0){
        C-=A;
        day++;
    }

    cout << 7*week+day << endl;

    return 0;

}

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

int main(){

    int day=0, money=0, a, b, goal;
    cin >> a >> b >> goal ;

    while (money < goal){
        day += 1;
        money += a;
        if (day % 7 == 0)money += b;
    }

    cout << day << endl;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
int main(void){
    int a,b,c,sum=0,count=0,login=0;
    cin>>a>>b>>c;
    while (sum<c) {
        login++;
        count++;
        sum+=a;
        if (count==7) {
            sum+=b;
            count=0;
        }
    }
    cout<<login<<endl;
}

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

int main() {
  int A, B, C; cin >> A >> B >> C;
  int per_week;
  per_week = A * 7 + B;
  
  int week = C / per_week;
  int remain = C % per_week;

  int day = 0;
  int cou = 0;
  
  while (remain > 0) {
      remain -= A;
      day++;
      cou++;
    if (cou == 7) {
      remain -= B;
      cou = 0;
    }
  }
  
  int count = week * 7 + day;
  
  cout << count << endl;
  
  return 0;
}