Go: package main

import (
	"fmt"
)

func main() {
	var A, B, N int
	fmt.Scanf("%d %d %d", &A, &B, &N)

	login := 0
	week := 0
	sum := 0

	for sum < N {
		login++
		week++
		sum += A

		if week%7 == 0 {
			sum += B
			week = 0
		}
	}

	fmt.Println(login)
}

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

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>

using namespace std;

int main(void){
    int a,b,c,day,dd;
    cin >> a >> b >> c;
    day=0;
    day += 7*(c/(7*a+b));
    c = c%(7*a+b);
    dd = c/a;
    if(dd>=7){
        day+=7;
    }else{
        if(c%a!=0){
            day++;
        }
        day+=dd;
    }
    cout << day << endl;
}

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

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

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

    while(C>sum){
        for(int i=0; i<7; i++){
            if(C>sum){
                day++;
            }
            sum+=A;
        }
        sum+=B;
    }
    cout << day <<"\n";
    return 0;
}

C++: /*JOI君は最低C枚のコインを得たい.
→1日でA枚のコイン、7日でB枚追加.

i) B = 0の場合:
	日数に関係なく得たコインの枚数がC枚に到達するまでAを足し続ける.　→　足した回数を出力すればよい.

ii) B ≠ 0の場合:
	C枚に達するまでAを足し続けるが、足した回数が7の倍数になれば、追加でBを足す.　→　足した回数を出力.

まとめると:
	・枚数がCに達するまでAを足す.　…　いつCに達するか分からない.　→　while文を使うべき.
	・もし足した回数が7の倍数になれば、Bを足す.
	・これらを実行し、回数や得たコインの枚数は何かの変数に入れる. 　→　得たコインの枚数がCを超えれば、breakする.
*/
#include <iostream>
using namespace std;

int main() {
	//入力.
	long A, B, C; cin >> A >> B >> C;
	//得たコインの枚数と、回数を記録する変数を用意.
	//0で初期化する必要がある.
	int sum = 0, ans = 0;
	//ログイン.
	while (true) {
		sum += A;
		ans++;
		if (ans % 7 == 0) sum += B;
		if (C <= sum) break;
	}
	//出力.
	cout << ans << endl;
}

C++: #include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<vector>
#include<deque>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<algorithm>
#include<functional>
#include<utility>
#include<bitset>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<cstdio>

using namespace std;

#define REP(i,n) for(int i=0;i<int(n);i++)
#define foreach(c,itr) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
typedef long long ll;
typedef pair<int,int> P;

int main(void){
	          int i;

	          cin.tie(0);  ios_base::sync_with_stdio(false);

	          int A,B,C;
	          cin >> A >> B  >> C;

	          int q=C/(7*A+B),r=C%(7*A+B);
	          if(r<=7*A) r=(r+A-1)/A;
	          else r=7;

	          cout << 7*q+r << endl;

	          return 0;
}

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

  cin >> A >> B >> C;
  int Day=0;

  while(C>0){
    Day+=1;
    if(Day%7==0){
      C=C-A;
      C=C-B;
    }
    else{
      C=C-A;
    }
  }

  cout << Day << "\n";
}

C++: #include <iostream>

int main(){
    
    int a,b,c;
    int coins = 0;
    int days = 1;
    std::cin >> a >> b >> c;
    
    while(1){
        coins += a;
        if(days % 7 == 0){
            coins += b;
        }
        
        if(coins >= c)break;
        days++;
    }
    
    std::cout << days << "\n";
    return 0;
}

C++: #include <stdio.h>
#include<vector>
#include<iostream>
#include<string>
#include<deque>
#include<queue>
#include<stack>
#include<list>
#include<cmath>
using namespace std;


int main() {
	
	int a, b, c,d,e,f;

	cin >> a >> b >> c;
	d = a * 7 + b;
	e = c / d*7;
	if (c%d <= a * 6)
	{
		f = (c % d+(a-1))/a;
	}
	else
	{
		f = 7;
	}cout <<e+f<< endl;
	return 0;
}

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

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

int main() {
    int a, b, c, ans=0;
	cin >> a >> b >> c;
	while(a*ans+b*(ans/7)<c){
		ans++;
	}
	cout << ans << endl;
    return 0;
}

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

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

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

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

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

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

int main()
{
    int a,b,c; cin >> a >> b >>c;
    int per_week = 7*a + b;
    int week = c/per_week;
    int remain = c - week*per_week;
    
    int ans= 0;
    
    ans = (remain + a -1 )/a;
    if(ans >7) ans=7;
    ans += 7*week;
    
    

    cout << ans << endl;
    


    return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
int main(void)
{
	int a,b,c,i,cnt;
	cnt=0;
	cin>>a>>b>>c;
	while(1){
		if(c<=0) break;
		c=c-a;
		cnt=cnt+1;
		if(cnt%7==0) c=c-b;
	}
	cout<<cnt<<endl;
	return 0;
}

C++: #include "bits/stdc++.h"
using namespace std;
int main() {
	long long A, B, C;
	cin >> A >> B >> C;
	long long ans = 0, num = 0;
	while (num < C) {
		ans++;
		num += A;
		if (ans % 7 == 0) num += B;
	}
	cout << ans << endl;
}

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

int main(){
	int a,b,c;cin>>a>>b>>c;
int x=7*a+b,cnt=0;
cnt+=c/x*7;int y=c%x;if(y>0)cnt+=min((y-1+a)/a,7);
cout<<cnt<<endl;
}

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


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

	cin >> A >> B >> C;

	int week = C / (A * 7 + B);

	C -= (A * 7 + B) * week;

	int day = (C / A >= 7) ? 7 : (C % A == 0) ? C / A : C / A + 1;

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

	return 0;
}

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,sum=0,n;
    cin >> a >> b >>c;
    for(int i=0; ; i++){
        sum=i*a+i/7*b;
        if(c<=sum){
            cout << i << endl;
            break;
        }
    }
}