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;
using ll = long long;
const ll INF = 1e18;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template<class T> inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int ctoi(char c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  return 0;
}
ll factorial(ll n) {
  if (n == 1) {
    return 1;
  }
  ll ans = factorial(n-1);
  return ans*n;
}
ll gcd(ll a, ll b) {
  if (a < b) {
    ll tmp = a;
    a = b;
    b = tmp;
  }
  ll r = a%b;
  while(r != 0) {
    a = b;
    b = r;
    r = a%b;
  }
  return b;
}
ll lcm(ll a, ll b) {
  return (a/gcd(a, b))*b;
}

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

C++: #include <iostream>
using namespace std;
int main() {
    int A, B, C;
    cin >> A >> B >> C;

    int goal = C;
    int d = 1;
    while (true) {
        goal -= A;
        if (goal <= 0) break;
        if (d % 7 == 0) goal -= B;
        if (goal <= 0) break;
        d++;
    }
    cout << d << endl;
    
    return 0;
}

C++: #include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <tuple>
#include <vector>
#include <map>
#include <unordered_map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace std;
#define LL long long
#define MP(a, b) make_pair(a, b)
#define MMP(a, b, c) make_pair(make_pair(a, b), c)
#define MAX 1000000000
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483648
#define INT_MAX 2147483647
#define LL_MIN -9223372036854775808
#define LL_MAX 9223372036854775807
#define PI 3.14159265359


int main(){
    iostream::sync_with_stdio(false);
    
	int A,B,C;
	cin >> A >> B >> C;
	int tmp = 0;
	for(int i=1; i<INT_MAX; i++){
		tmp += A;
		if(i%7 == 0) tmp += B;
		if(tmp >= C){
			cout << i << endl;
			return 0;
		}
	}
    
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a, b, c; //a:１ログインでもらえるコイン数, b:７日間連続でログインしたらもらえるコイン数, c:欲しいコイン数
    cin >> a >> b >> c;
    int ans = 0; //回数カウンタ
    int d = 0; //枚数カウンタ
    while(d < c){
        ans++;
        d += a;
        if(ans%7 == 0){
            d += b;
        }
    }

    cout<<ans<<endl;

    return 0;
    }

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

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

int main(){
	int a,b,c,goukei,hi;
	hi=1;
	cin >> a>>b>>c;
	while(goukei<c){
	    if(hi%7!=0){
	    goukei += a;
	    hi++;
	    }
	    else{
	       goukei =goukei+a+b;
	       hi++;
	    }
	        
	    }
	    cout<<hi-1<<endl;
	    
	   
}

C++: #include<iostream>
#include<iomanip>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<numeric>
#include<limits>
#include<bitset>
#include<functional>
#include<type_traits>
#include<queue>
#include<stack>
#include<array>
#include<random>
#include<utility>
#include<cstdlib>
#include<ctime>
#define ll long long
#define rep(i,n) for(int i = 0; i < n; i++)
#define MOD 1000000007
using namespace std;

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

C++: #include <iostream>
using namespace std;
int main(int argc, char const *argv[]) {
        int a, b, c;
        int cnt = 0, coins = 0;
        cin >> a >> b >> c;
        while (true) {
                cnt++;
                if(coins >= c) {
                        cnt--;
                        break;
                }
                coins += a;
                if(cnt % 7 == 0) {
                        coins += b;
                }

        }
        cout << cnt << endl;
        return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a;
    int b;
    int c;
    int d;
    int e;
    int f;
    int g;
    int h;
    int i;  
    cin>>a;
    cin>>b;
    cin>>c;
    d=c/a;
    i=c%a;
    if(d<7){
        if(i<0){
           cout<<d<<endl;
        }else{
           cout<<d+1<<endl; 
        }
    }else{
        e=c/(a*7+b);
        f=c%(a*7+b);
        g=f/a;
        h=f%a;
        if(h<0){
            cout<<e*7+g<<endl;
        }else{
            cout<<e*7+g+1<<endl;
        }
    }
}

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

using int32 = int32_t;
using int64 = int64_t;
int main(void ){
  int64 A, B, C;
  cin >> A >> B >> C;
  int64 res = 0, cnt = 0;
  while (C > 0) {
    cnt++;
    if (cnt > 0 && cnt % 7 == 0) {
      C -= B;
    }
    C -= A;
    res++;
  }
  cout << res << endl;
}

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

int A, B, C;
int main() {
    cin >> A >> B >> C;
    int res = 0;
    int cur = 0;
    for (int i = 1;; ++i) {
        cur += A;
        if (i % 7 == 0) cur += B;
        if (cur >= C) {
            res = i;
            break;
        }
    }
    cout << res << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a;
    int b;
    int c;
    int d;
    int e;
    int f;
    int g;
    int h;
    cin>>a;
    cin>>b;
    cin>>c;
    d=c/a;
    if(d<7){
        cout<<d<<endl;
    }else{
        e=c/(a*7+b);
        f=c%(a*7+b);
        g=f/a;
        h=f%a;
        if(h<0){
            cout<<e*7+g<<endl;
        }else{
            cout<<e*7+g<<endl;
        }
    }
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int A,B,C;
    cin>>A>>B>>C;
    int s{};
    while(C>0){
        C=C-A;
        s++;
        if(s%7==0)C=C-B;
    }
    cout<<s<<endl;
}

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

int main(){
    int a,b,c;
    cin >> a >> b >> c;
    int d=c/(a*7+b);
    int e=c%(a*7+b);
    if(e%a!=0){
        if(e>a*7){
            cout << d*7+7 << endl;
            return 0;
        }
        cout << d*7+e/a+1 << endl;
        return 0;
    }
    else
    {
        if(e>a*7){
            cout << d*7+7 << endl;
            return 0;
        }
        cout << d*7+e/a << endl;
        return 0;
    }
    
}

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

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

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

int main(){ 
    int A, B, C;
    cin >> A >> B >> C;
    
    int ans = 0;
    while(C>0){
        for(int i=0;i<7;i++){
            C -= A;
            ans++;
            if(C <= 0) goto end;
        }
        C -= B;
    }
    end: cout << ans << endl;
    return 0;
}