Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func printArr(arr []string) {
	fmt.Println(strings.TrimRight(fmt.Sprintf("%+v", arr)[1:], "]"))
}

func main() {
	scanner.Split(bufio.ScanWords)

	coinDaily, _ := nextInt()
	coinWeekly, _ := nextInt()
	coinTarget, _ := nextInt()

	coinCurrent := 0
	i := 0
	for i = 0; i <= 1000000; i++ {
		coinCurrent += coinDaily
		if (i+1)%7 == 0 {
			coinCurrent += coinWeekly
		}
		if coinCurrent >= coinTarget {
			break
		}
	}
	fmt.Println(i + 1)
}

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

int main()
{
    int a,b,c;
    cin >> a >> b >> c;
    int coin = 0;
    int day = 0;

    while(coin < c){
        day++;
        coin += a;
        if(day%7 == 0){
            coin += b;
        }
    } 
    cout << day << endl;
    return 0;
}

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

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

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

int main(){
    int coin_d, coin_b, norma,day;
    scanf("%d %d %d",&coin_d,&coin_b,&norma);
    day = (norma/(coin_d*7+coin_b))*7;
    if((norma%(coin_d*7+coin_b))/coin_d >= 7){
        day = day+7;
    }else if((norma%(coin_d*7+coin_b))%coin_d > 0){
        day = day + (norma%(coin_d*7+coin_b))/coin_d + 1;
    }else{
        day = day + (norma%(coin_d*7+coin_b))/coin_d;
    }
    cout << day << endl;
    return 0;
}

C++: #include <bits/stdc++.h>
#define REP(i, n) for (long long i = 0; i < (long long)n; i++)
#define _GLIBCXX_DEBUG
#define ll long long
using namespace std;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll A, B, C;
    cin >> A >> B >> C;
    ll W = (7 * A) + B;
    ll T = C % W;
    cout << ((C / W) * 7) + min(7, (int)((T + A - 1) / A)) << endl;
}

C++: #include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;
 
 
 
 
int main(){
 
    int A,B,C;
 
    scanf("%d %d %d",&A,&B,&C);
 
    int ans = C,left = 0,right= C,mid = (left+right)/2;
 
    while(left <= right){
 
        if(mid*A+mid/7*B >= C){
 
            ans = mid;
            right = mid-1;
 
        }else{
 
            left = mid+1;
        }
        mid = (left+right)/2;
    }
 
    printf("%d\n",ans);
 
    return 0;
}

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

int main(void){
    int a,b,c;
    cin>>a>>b>>c;
    int n=c/(a*7+b);
    int rem=c-n*(a*7+b);
    cout<<n*7+(rem-rem%a)/a<<endl;
    return 0;
}

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

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

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

  int count = 0;
  int point = 0;
  while(1) {
    count++;
    point+=a;
    //cout << count << " " << point << endl;
    if(count % 7 == 0) point+=b;
    if(point >= c) {
      cout << count << endl;
      break;
    }
  }

  return 0;
}

C++: #include <iostream>

int cutBySeven(int x)
{
  if (x > 7){
    return 7;
  }else{
    return x;
  }
}

int main()
{
  // データ準備
  int a, b, c;

  std::cin >> a >> b >> c;

  // 1週間ログインするともらえるコイン
  int coinPerWeek = 7*a+b;

  // 最低何週間のログインが必要か
  int minimumWeek = c/coinPerWeek;

  // minimumWeek 週間のログインで足りない分のコイン
  int luck = c%coinPerWeek;

  // luck 分のコインを集めるのに必要な日数
  int daysForLuck = cutBySeven((luck%a==0) ? luck/a : luck/a+1);

  // 出力
  std::cout << minimumWeek*7+daysForLuck << '\n';
}

C++: #include <iostream>
using namespace std;
int main(void){

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

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
using namespace std;
typedef long long ll;
const int INF = 1<<30;
const int MOD = 1e9 + 7;
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int A, B, C; cin >> A >> B >> C;
    int ans = 0;
    while(C > 0)
    {
        int res = 0;
        if(C >= 7 * A)
        {
            C -= 7 * A + B;
            res += 7;
        }
        else
        {
            res += (C + A - 1) / A;
            C = 0;
        }
        ans += res;
    }
    cout << ans << endl;
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    
        int A, B, C;
        cin >> A >> B >> C;
        int ans = 0;
        int i = 0;
        
        while(true){
            i++;
            if(i%7 != 0){
                C-=A;
                ans++;
                if(C <= 0) break;
            }
            else{
                C-=(A+B);
                ans++;
                    if(C <= 0) break;
            }
            
        }
        
        cout << ans << endl;

}

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

using namespace std;

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    int now = 0;
    int day = 0;
    while (now < c) {
        now += a;
        ++day;
        if (day % 7 == 0) {
            now += b;
        }
    }
    cout << day << '\n';
}

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

int main() {


int A , B , C = 0 ;	// A:毎日もらえるコイン数 , B:7日連続ログインでもらえるコイン数 , C:手に入れたい総コイン数


int days = 0 ; 
int week_day_count = 0 ; // 週の何日目かのカウント。月曜日:1 , 火曜日:2 , …　土曜日:6 , 日曜日:7

cin >> A >> B >> C ;


	while( C > 0 ){
	
	days = days + 1 ;			// 「経過日数」を1追加
	week_day_count = week_day_count + 1 ;	// 週の何日目かのカウントを1追加

	C = C - A ;				// 毎日のログインボーナスの処理

		if( 7 == week_day_count ) 	//「日曜日になったとき」の処理。if( week_day_count == 7 )としなかったのはミス防止
		{ C = C - B ; 
		  week_day_count = 0 ;		// 週の何日目かのカウントを0にする。
		}else{				// C++ではelse{}は省略可
		}

		if( C <= 0 ) 			// Cが0未満になったときループを抜ける
		{
		break;
		}else{				// C++ではelse{}は省略可
		}
    

	}

cout << days << endl;

}

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

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

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

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

int a, b, c, ans, w;

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