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 <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

int main()
{
	string buffer;

	while ( cin >> buffer )
	{		
		for ( unsigned int i = 0; i < buffer.length(); i++ )
		{
			if ( buffer[i] == ',' )
			{
				buffer[i] = ' ';
			}
		}		

		vector<int> rail;
		istringstream iss( buffer );

		rail.push_back( 0 );
		for ( int i = 0; i < 10; i++ )
		{
			int input;
			iss >> input;
			rail.push_back( rail[i] + input );
		}

		int v1, v2;
		iss >> v1 >> v2;

		int total = *( rail.rbegin() );
		double p = (double)v1 / v2 / 2;

		for ( unsigned int i = 0; i < rail.size(); i++ )
		{
			if ( p * total <= rail[i] )
			{
				cout << i << endl;
				break;
			}
		}
	}

	return 0;
}

C++:     cout << " v1 " << v1 << endl;

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

int main()
{

int num[11]={};
int x,t,T=0;
double S1=0,S2=0,V1,V2,W;
bool f1=false,f2=false;

for(int i=0;i<10;i++)
{scanf("%d",&x);num[i]=x;}
cin>>V1>>V2;

for(int i=0;i<10;i++)
S1+=num[i];
for(int i=0;i<10;i++)
S2=V1+V2;
t=0;
W=S1*V1/S2;

do{

T+=num[t];
if(T==W)f1=true;
t++;
}while(T<W);
if(f1==false)printf("%d\n",t);
else if(f1==true)printf("%d\n",t);

return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>


using namespace std;

int main()
{
	int l[10];
	int v1, v2;
	while (scanf(" ") != EOF)
	{
		for (int i = 0; i < 10; ++i)
			scanf("%d,", l+i);
		if (scanf("%d,%d", &v1, &v2) == EOF)
			break;

		int len = 0;
		for (int i = 0; i < 10; ++i)
			len += l[i];
		double across = (double)v1*len/(v1+v2);
		int t = 0;
		for (int i = 0; i < 10; ++i)
		{
			t += l[i];
			if (across <= t)
			{
				printf("%d\n", i+1);
				break;
			}
		}
	}

	return 0;
}

C++: 
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <utility>
#include <complex>
#include <stack>
#include <climits>
#include <set>
#include <numeric>

using namespace std;

double sq(double x){return x*x;}

int main(){
	int l[10],v1,v2;
	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)){
		int len = accumulate(l,l+10,0);
		double left = (double)len * v1 / (v1 + v2);
		for (int i = 0; i < 10; i++)
		{
			left -= l[i];
			if(left <= 0){
				printf("%d\n",i+1);
				break;
			}
		}
	}

	return 0;
}

C++: #include <stdio.h>

int main(void) {
  int l[10];
  while(scanf("%d", &l[0]) != EOF) {
  int sum, v1, v2, vs, now = 0, i, j;
  sum = l[0];
  for(i = 1; i < 10; ++i) {
    scanf(",%d", &l[i]);
    sum += l[i];
  }
  scanf(",%d,%d", &v1, &v2);
  vs = v1 + v2;
  double t = (double)sum / (double)vs;
  //printf("sum%d vs%d t%f\n", sum, vs, t);
  for(i = 0; i < 10; ++i) {
    if(now >= t * v1) {
      printf("%d\n", i);
      break;
    }
    now += l[i];
  }
  }
  return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  int b[10],k[10],i,v1,v2;
  double h;
  while (cin >> b[0] >> b[1] >> b[2] >> b[3] >> b[4] >> b[5] >> b[6] >> b[7] >> b[8] >> b[9] >> v1 >> v2) {
    k[0]=b[0];
	for (i=1;i<10;i++) k[i]=k[i-1]+b[i];
	if (v1!=0) h=(double)v1*k[9]/(v1+v2); else h=0;
	for (i=0;i<10;i++) if (h>=k[i]-b[i] && h<=k[i]) break;
	cout << i+1 << endl;
  }
  return 0;
  }

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

int main(){
	int l[10], v1, v2;
	string str;
	int p;
	int sum, part;
	double time1, dist2;
	
	while(getline(cin, str)){
		for(int i = 0; i < 10; i++) l[i] = 0;
		v1 = 0; v2 = 0;
		
		p = 0;
		for(int i = 0; i < 10; i++){
			while(str[p] != ','){
				l[i] = l[i] * 10 + (str[p] - 48);
				p++;
			}
			p++;
		}
		while(str[p] != ','){
			v1 = v1 * 10 + (str[p] - 48);
			p++;
		}
		p++;
		while(p < str.size()){
			v2 = v2 * 10 + (str[p] - 48);
			p++;
		}
		
		sum = 0;
		for(int i = 0; i < 10; i++) sum += l[i];
		
		part = 0;
		for(int i = 0; i < 10; i++){
			part += l[i];
			
			time1 = (double)part / v1;
			dist2 = time1 * v2;
			
			if(part + dist2 >= sum){
				cout << i + 1 << endl;
				break;
			}
		}
	}
	
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#define  rep(i,n) for(int i = 0 ; i < n ; i++ )
using namespace std;

int main(){
  double v1,v2;
  int l[10];
  double sum = 0;
  rep(i,10){
    scanf("%d,",&l[i]);
    sum += l[i];
  }
  scanf("%lf,%lf",&v1,&v2);
  double sum2 = 0;
  v1=(v1/(v1+v2))*sum;
  rep(i,10){
    sum2+=l[i];
    if(v1 <= sum2){
      cout << i+1 << endl;
      break;
    }
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
  int a,v1,v2,sum[10];
  char c;
  while(cin >> a >> c){
    sum[0] = a;
    for(int i = 1 ; i < 10 ; i++ ){
      cin >> a >> c;
      sum[i] = a + sum[i - 1];
    }
    cin >> v1 >> c >> v2;
     
    double t = ((double)v1/(v1 + v2))*sum[9];
    for(int i = 0 ; i < 10 ; i++ ){
      if(t <= sum[i] ){
    cout << i + 1 << endl;
    break;
      }
    }
  }
  return 0;
}

C++: #include<iostream>
#include<cstdio>
#define dff 1e-19
using namespace std;
int main(){
  double a[10],v[2];
  for(;;){
    if(scanf("%lf,",&a[0]) == EOF) break;
    for(int i=1; i<10; i++) scanf("%lf,",&a[i]);
    scanf("%lf,%lf",&v[0],&v[1]);
    double x=0,t;
    for(int i=0; i<10; i++) x+=a[i];
    t = x/(v[0]+v[1]);
    x = t*v[0];
    for(int i=0; i<10; i++){
      x-=a[i];
      if(x<=dff){cout <<i+1<<endl;break;}
    }
  }
  return 0;
}

C++: #include <stdio.h>

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

C++: #include<iostream>
#include<sstream>
using namespace std;
int s2d(string buf){
  istringstream iss(buf);
  double x;iss >> x;
  return x;
}
int main(){
  string buf;
  while(cin>>buf){
    int i;
    for(i=0;i<buf.size();i++) if(buf[i]==',') buf[i]=' ';
    stringstream ss(buf);
    double d[12];
    for(i=0;i<12;i++){
      ss >> buf;
      d[i]=s2d(buf);
      //cout << i << ":" << d[i] << endl;
    }
    double p=0;
    for(i=0;i<10;i++) p+=d[i];
    p*=d[10]/(d[10]+d[11]);
    //cout << p << endl;
    int o=0,k=0;
    for(i=0;i<10;i++){
      if(p<=k+d[i]){
	o=i+1;
	break;
      }
      k+=d[i];
    }
    cout << o << endl;
  }
  return 0;
}