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(){
	int a[20] = {0};
	while(scanf("%d",&a[0]) != EOF){
        int sum = a[0];
        for(int i = 1; i < 10; i++){
            scanf(",%d",&a[i]);
            sum += a[i];
        }
        int v1,v2;
        scanf(",%d,%d",&v1,&v2);
        double ans;
        ans = (double)(v1*sum)/(v1+v2);
        int x;
        sum = 0;
        for(int i = 0; i < 10; i++){
            sum += a[i];
            if(sum > ans){
                x = i + 1;
                break;
            }
            else if(sum == ans){
                x = i + 1;
                break;
            }

        }
        cout << x << endl;
	}
	return 0;
}

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

using namespace std;

int main(void){
  int l[10];
  int v[2];
  int i, j;
  int sum;
  double p;

  while(cin >> l[0]){
	cin.ignore();
	cin >> l[1];
	cin.ignore();
	cin >> l[2];
	cin.ignore();
	cin >> l[3];
	cin.ignore();
	cin >> l[4];
	cin.ignore();
	cin >> l[5];
	cin.ignore();
	cin >> l[6];
	cin.ignore();
	cin >> l[7];
	cin.ignore();
	cin >> l[8];
	cin.ignore();
	cin >> l[9];
	cin.ignore();
	cin >> v[0];
	cin.ignore();
	cin >> v[1];
	sum = 0;
	for(i=0;i<10;i++){
	  sum += l[i];
	}

	p = sum * ((double)v[0] / (v[0] + v[1]));

	i=0;
	while(p > 0){
	  p -= l[i++];
	}
	cout << i << endl;

  }
  return 0;
}

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <iomanip>
#include <stack>
#include <sstream>
int main(){
  using std::cout;
  using std::endl;
  double l[10]={0},v1,v2,sdis,adis,dis;
  v1=v2=dis=sdis=adis=0;
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2)!=EOF){
    for(int i=0;i<10;i++){
      adis+=l[i];
    }
    dis=v1*adis/(v1+v2);
    for(int j=0;j<10;j++){
      sdis+=l[j];
      if(dis<=sdis){cout<<j+1<<endl;break;}
    }
  }
  return 0;
}

C++: #include <iostream>
#include <stdio.h>
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;
}

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, 0);
	for (int c=0; c<2000000; c++) {
		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])*(int)(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 <cstdio>
using namespace std;

int l[10], v1, v2;

int main(){
    while( scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
                   l,l+1,l+2,l+3,l+4,l+5,l+6,l+7,l+8,l+9,
                   &v1, &v2) != EOF ){
        int sl = 0;
        for(int i = 0; i < 10; i++){
            sl += l[i];
        }
        double p = (double)sl*v1/(v1+v2);
        int i, k = 0;
        for(i = 0; i < 10; i++){
            k += l[i];
            if( p <= k ) break;
        }
        printf("%d\n", i+1);
    }

    return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(void){
  
    int l[15];
    int i,a,b;
  
    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],&a,&b)!=EOF){
  
        double sum=0;
        for(i=0;i<10;i++){
            sum+=(double)l[i];
        }
  
    double c=0,d=0;
    for(i=0;i<10;i++){
        c+=l[i];
        d+=(double)l[i]/a*b;
        if(c+d>=sum)break;
    }
    cout<<i+1<<endl;
  
    }
    return 0;
}

C++: #include<iostream>
#include<cstdio>
#define eps 10e-9
using namespace std;
int main()
{
    int data[10],sum=0;
    int v1,v2;
    while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&data[0],&data[1],&data[2],&data[3],&data[4],&data[5],&data[6],&data[7],&data[8],&data[9],&v1,&v2)!=EOF)
    {
        sum=data[0];
        for(int i = 1; i < 10; ++i)
        {
            sum+=data[i];
            data[i]=sum;
        }
        //cout<<"sum="<<data[9]<<endl;
        double t=data[9]/(double)(v1+v2);
        //printf("t=%.9lf\n",t);
        for(int i = 0; i < 10; ++i)
        {
            if(v1*t<(double)data[i]+eps)
            {
                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+=rize;u+=tiya;
        }
        rep(i,range.size()){
            v-=range[i];
            if(v<=0){cout<<i+1<<endl; break;}
        }
    }
}