Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	a := make([]float64, 10)
	for scanner.Scan() {
		info := strings.Split(scanner.Text(), ",")
		for j := 0; j < 10; j++ {
			a[j], _ = strconv.ParseFloat(info[j], 64)
		}
		v1, _ := strconv.ParseFloat(info[10], 64)
		v2, _ := strconv.ParseFloat(info[11], 64)
		sum := 0.0
		for i := 0; i < 10; i++ {
			sum += a[i]
		}
		match := v1 * ((sum/(v1+v2)))
		if match == 0 {
			fmt.Println(1)
		} else {
			sum = 0
			for k := 0; k < 10; k++ {
				sum += a[k]
				if match <= sum {
					fmt.Println(k+1)
					break
				}
			}
		}
	}
}

C++: #include <stdio.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int L[10], v1, v2;

int main() {
    while (scanf("%d", L) != EOF) {
        rep (i, 9) scanf(",%d", L+i+1);
        scanf(",%d,%d", &v1, &v2);
        double s = 0;
        rep (i, 10) s += L[i];
        const double t = s / (v1+v2);
        double x = t*v1;
        rep (i, 10) {
            if (x <= L[i]) {
                printf("%d\n", i+1);
                break;
            }
            x -= L[i];
        }
    }
    return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(){
  int l[111];
  int a,b;
  int i;
  double test=0;
  double ans=0,ans1=0;
  for(i=0;i<11;i++){
    scanf("%d,",&l[i]);
    ans+=l[i];
  }
  scanf("%d,%d",&a,&b);
  ans1=a+b;
  ans=ans/ans1;
  ans=ans*a;
  for(i=0;i<11;i++){
    test+=l[i];
    if(test>=ans)break;
  }
  i++;
  cout << i << endl;
}

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

using namespace std;

int main() {
	int v1,v2,sum,ret;
	vector<int> l(10);
	while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n", l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],v1,v2)) {
		sum = l[1]+l[2]+l[3]+l[4]+l[5]+l[6]+l[7]+l[8]+l[9]+l[10];
		sum *= (v1/(v1+v2));
		for (int i=0; i<10; i++) {
			sum -= l[i];
			if (sum <= 0) {
				ret = i;
				break;
			}
		}
		cout << ret << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <numeric>

int main()
{
	int lengthes[10];
	char tmp;
	while (std::cin >> lengthes[0] >> tmp >> lengthes[1] >> tmp >> lengthes[2] >> tmp >> lengthes[3] >> tmp >> lengthes[4] >> tmp >> lengthes[5] >> tmp >> lengthes[6] >> tmp >> lengthes[7] >> tmp >> lengthes[8] >> tmp >> lengthes[9] >> tmp )
	{
		int v1, v2;
		std::cin >> v1 >> tmp >> v2;

		int sum = std::accumulate(lengthes[0], lengthes[10], 0);

		double sec = (double)(sum) / (v1 + v2);
		double dist = v1 + sec;

		int all = 0;
		int index = 1;
		for (auto length : lengthes)
		{
			all += length;
			if (dist < all)
			{
				std::cout << index << std::endl;
				break;
			}
			index++;
		}
	}

	return 0;
}

C++: #include <stdio.h>
#include <algorithm>
#include <iostream>
using namespace std;

#define REP(i,n) for(int i=0; i<n; i++)

int main()
{
  int l[10];
  int v1,v2;
  char del;

  while(true){

    REP(i,10){
      cin >> l[i] >> del;
    }
    if(!(cin >> v1 >> del >> v2))
      break;

    int sum=0;
    REP(i,10) sum += l[i];

    double t = (double)sum / (v1+v2);
    double len = t * v1;

    int tmp=0;
    int res=0;
    REP(i,10){
      tmp += l[i];
      if(tmp >= len){
	res = i+1;
	break;
      }
    }

    cout << res << endl;
  }

  return 0;
}

C++: #include<cstdio>

using namespace std;

int main(void){
	int ku[10],i,ans=0;
	float v1,v2,zen=0,hit;

	while((scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%f,%f,",&ku[0],&ku[1],&ku[2],&ku[3],&ku[4],&ku[5],&ku[6],&ku[7],&ku[8],&ku[9],&v1,&v2))!=EOF){
			for(i=0;i<10;i++)	zen+=ku[i];
			hit=(zen*v1)/(v1+v2);
			for(i=0;i<10;i++){
				if(ans>=hit)	break;
				ans+=ku[i];
			}

			printf("%d",ans);
			zen=0;
			ans=0;
	}

	return 0;
}

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

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
#define int ll

vector<string> split(const string &str, char sep)
{
  vector<string> v;
  auto first = str.begin();
  while( first != str.end() ) {
    auto last = first;
    while( last != str.end() && *last != sep ) ++last;
    v.push_back(std::string(first, last));
    if( last != str.end() ) ++last;
    first = last;
  }
  return v;
}

signed main(void)
{
  string s;
  while(cin >> s) {
    vector<string> v = split(s, ',');
    int l1[11] = {0}, l2[11] = {0}, v1, v2;
    REP(i, v.size()) {
      if(i<10) {
        l1[i+1] = stoi(v[i]);
        l2[i] = l1[i+1];
      }
      else if(i == 10) v1 = stoi(v[i]);
      else if(i == 11) v2 = stoi(v[i]);
    }
    FOR(i, 1, 11) l1[i] += l1[i-1];
    for(int i=8; i>=0; --i) l2[i] += l2[i+1];
    double t1[10], t2[10];
    REP(i, 11) {
      t1[i] = (double)l1[i]/v1;
      t2[i] = (double)l2[i]/v2;
    }
    //REP(i, 11) cout << t1[i] << " "; cout << endl;
    //REP(i, 11) cout << t2[i] << " "; cout << endl;
    REP(i, 10) {
      if((t1[i] < t2[i] && t2[i] <= t1[i+1]) ||
      (t1[i] < t2[i+1] && t2[i+1] <= t1[i+1])) {
        cout << i+1 << endl;
        break;
      }
    }
  }

  return 0;
}

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

int main(){
	double t[10], a, b;
	char c;
	while(cin >> t[0] >> c){
		for(int i = 1;i< 10;i++){cin >> t[i] >> c;t[i] += t[i-1];}
		cin >> a >> c >> b;
		double tmp = t[9]/(a+b)*a;
		int ans = 1;
		while(tmp > t[ans-1])ans++;
		cout << ans << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>

using namespace std;

int main()
{
	string line;
	while(cin >> line)
	{
		replace(line.begin(), line.end(), ',', ' ');
		stringstream stream(line);

		int l[10];
		int path = 0;
		for(auto& i : l)
		{
			stream >> i;
			path += i;
		}

		int v1, v2;
		stream >> v1 >> v2;

		double time = (double)path / (v1 + v2);
		double position = v1 * time;
		int dist = 0;
		for(int i = 0; i < 10; i++)
		{
			dist += l[i];
			if(position <= dist)
			{
				cout << i + 1 << endl;
				break;
			}
		}
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  long long l[10],v1,v2,len,point,now;
  while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2)){
    len=0;
    for(int i=0;i<10;i++){
      len+=l[i];
    }
    point=(v1*len)/(v1+v2)+((v1*len)%(v1+v2)>0);
    now=0;
    for(int i=0;i<10;i++){
      now+=l[i];
      if(now>=point){
        cout << i+1 << endl;
        break;
      }
    }
  }
  return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <cstdio>
using namespace std;
int main(){
	int l[10],v1,v2;
	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2) != EOF){
		int length=0;
		for(int i=0;i<10;i++){
			length += l[i];
		}
		double x=v1*length/(double)(v1+v2);
		double sum=l[0];
		for(int j=1;j<10;j++){
			if(sum>=x){
				cout<<j<<endl;
				break;
			}
			sum += l[j];
		}
	}
	return 0;
}