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 <iostream>
#include <cstdio>
using namespace std;

int main(void) {
  int l[10];
  int v1, v2;
  double length;
  double distance;
  
  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) {
    length = 0;
    for(int i = 0; i < 10; ++i) {
      length += l[i];
    }
    
    distance = v1 * length / (v1 + v2);
    if(distance == 0) {
      cout << 1 << endl;
    } else {
      length = 0;
      for(int i = 0; i < 10; ++i) {
        length += l[i];
        if(length >= distance) {
          cout << i + 1 << endl;
          break;
        }
      }
    }
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>

using namespace std;

int main(int argc, char *argv[]) {
  double d[10], v1, v2;
  vector<int> result;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,\n",
               d, d+1, d+2, d+3, d+4, d+5, d+6, d+7, d+8, d+9, &v1, &v2) != EOF) {
    double hoge = 0;
    for (int i = 0; i < 10; i++)
      hoge += d[i];
    hoge /= v1 + v2;
    hoge *= v1;
    double piyo = 0;
    for (int i = 0; i < 10; i++)
      if (hoge <= piyo) {
        result.push_back(i);
        break;
      } else {
        piyo += d[i];
      }
  }

  for (int i = 0; i < result.size(); i++)
    cout << result[i] << endl;
  return 0;
}

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

int main(void){
	int l[10];
	char c;
	double ls, x1, t, v1, v2;
	while(1){
		ls = 0;
		for(int i = 0; i < 10; i++){
			cin >> l[i] >> c;
			ls += l[i];
		}
		cin >> v1 >> c >> v2;
		if(cin.eof())break;
		x1 = t = 0.0;
		for(int i = 0; i < 10; i++){
			x1 += l[i];
			t = x1 / v1;
			if(x1 + t * v2 >=ls){
				cout << ++i << endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
#include <vector>
#include <map>
#include <cstdio>

using namespace std;

int main(){
	int a[12];
	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
				,&a[0],&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],&a[9],&a[10],&a[11]) != EOF){

		int ans = 0;	
		double t = 0, d = 0;
		int sum = 0;
		for(int i = 0;i < 10;i++){
			sum += a[i];
		}
		t = (double)sum / (a[10]+a[11]);
		d = (double)a[10] * t;
		sum = 0;
		for(int i = 0;i < 10;i++){
			sum += a[i];
			if(sum >= d){
				ans = i + 1;
				break;
			}
		}
		cout << ans << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<vector>
#include<string>
#include<sstream>
using namespace  std;
vector<string> split(const string &s, char delimiter)
{
	vector<string> ret;
	size_t now = 0, find;
	while ((find = s.find_first_of(delimiter, now)) != string::npos)
	{
		ret.push_back(string(s, now, find - now));
		now = find + 1;
	}
	ret.push_back(string(s, now, s.size() - now));
	return ret;
}
int main()
{
	string in;
	while (cin >> in)
	{
		vector<string> v = split(in, ',');
		int disSum = 0;
		int dis[10];
		int sp[2];
		for (int i = 0; i < v.size(); i++)
		{
			stringstream ss;
			ss << v[i];
			if (i < 10)
			{
				ss >> dis[i];
				disSum += dis[i];
			}
			else
			{
				ss >> sp[i - 10];
			}
		}
		double a = disSum * sp[0] / (sp[0] + sp[1]);
		double b = disSum * sp[1] / (sp[0] + sp[1]);

		double fromStart = 0.0;
		double fromEnd = 0.0;
		int i = 0, j = 0;
		for (i = 0; i < 10; i++)
		{
			if (fromStart >= a)
			{
				break;
			}
			fromStart += dis[i];
		}
		for (j = 9; j >= 0; j--)
		{
			if (fromEnd >= b)
			{
				break;
			}
			fromEnd += dis[j];
		}
		/*cout << i << " " << j << endl;
		cout << a << " " << b << " " << fromStart << " " << fromEnd << endl;*/
		if (fromStart == a && fromEnd == b)
		{
			cout << i << endl;
		}
		else
		{
			if (fromStart == fromEnd)i++;
			cout << i << endl;
		}




	}
	return 0;
}

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

int main()
{
    int l[10] , v1 , v2 , n , cnt;
    double d , t;
    char ch;
    while((cin>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2) !=EOF){
        n=0;
        for(int i=0;i<10;i++){
            n+=l[i];
        }
        t=n/(v1+v2);
        d=v1*t;    //列車1の動く距離
        cnt=0;
        while(d>0){
            d -= l[cnt];
            cnt++;
        }
        cout << cnt << endl;
    }
	return 0;
}

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

int main() {
	int l[10],v1,v2;
	int len;
	float len1,len2;
	
	
	while(len=0,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)+1){
		for(int i=0;i<10;++i)len+=l[i];
		
		len1=0;
		len2=len;
		
		while(fabs(len1 - len2) > 0.1 ){
			len1 += 0.01f * v1;
			len2 -= 0.01f * v2;
		}
		
		len2=0;
		for(int i=0;i<9;++i){
			if(len1 >= len2 && len1 <len2+l[i]){
				cout<<i+1<<endl;
				break;
			}
			len2+=l[i];
		}
		
	}
	
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;
int main( void )
{
	string input;
	int l[10],v1,v2;
	while ( cin >> input )
	{
		replace( input.begin(), input.end(), ',', ' ' );
		istringstream is(input);
		for ( int i = 0; i < 10; i++ )
			is >> l[i];
		is >> v1 >> v2;

		int len = 0;
		for ( int i = 0; i < 10; i++ )
			len += l[i];

		double m = (double)v1 / v2;
		double c = (double)(len/2.0) * m;
		int co = (int)ceil(c);

		int sum = 0;
		for ( int i = 0; i < 10; i++ )
		{
			sum += l[i];
			if ( sum >= co )
			{
				cout << i+1 << endl;
				break;
			}
		}

	}
	return 0;
}

C++: #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
#include <iterator>
#include <array>
#include <memory>
#include <stack>
#define vi vector<double>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
int main(){
    int a;
    while(cin>>a){
        vi range; range.push_back(a);
        ll sum=0; sum+=a;
        rep(i,10){if(i){int gotiusa; cin>>gotiusa; range.push_back(gotiusa);sum+=gotiusa;}char gomi; cin>>gomi;}
        double v; cin>>v; v/=10; char gomi; cin>>gomi;
        double u; cin>>u; u/=10;
        double tiya=u,rize=v;
        bool touch=false;
        for(int i=0;;i++){
            if(v+u-(double)sum>=0)touch=true;
            if(touch)break;
            v+=tiya;u+=rize;
        }
        rep(i,range.size()){
            v-=range[i];
            if(v<=0){cout<<i+1<<endl; break;}
        }
    }
}