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 <string>
#include <map>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <iomanip>
#include <stack>
#include <sstream>
inline void dcout(int n){
  using std::cout;
  using std::endl;
  cout<<n<<endl;
}
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 <string>
using namespace std;

int main() {
  double l[10];
  char c;
  
  while(cin >> l[0] >> c) {
    // 区間全体を1に変換
    int sum = l[0];
    for(int i=1; i<10; i++) cin >> l[i] >> c, sum += l[i];
    for(int i=0; i<10; i++) l[i] = l[i]/sum;
    
    // 速さの和を1に変換
    double a, b;
    double left;
    cin >> a >> c >> b;
    left = a/(a+b);
    
    int t = 0;
    double L = 0.0;
    while( L < left ) {
      L += l[t++];
    }
    cout << t << endl;
  }
  
  return 0;
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef long long ll;
typedef unsigned long long ull;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); i++ )
#define UREP( i, m, n ) for ( unsigned int i = (unsigned int)( m ); i < (unsigned int)( n ); i++ )

#define ITER( c ) __typeof( (c).begin() )
#define IREP( c, it ) for ( ITER(c) it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()
#define RALL( c ) (c).rbegin(), (c).rend()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl

int main()
{
	string buffer;

	while ( getline( cin, buffer ) )
	{
		UREP( i, 0, buffer.length() )
		{
			if ( buffer[i] == ',' )
			{
				buffer[i] = ' ';
			}
		}

		vector<int> l;
		l.PB( 0 );
		istringstream iss( buffer );

		REP( i, 0, 10 )
		{
			int input;
			iss >> input;
			l.PB( l.back() + input );
		}

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

		UREP( i, 0, 11 )
		{
			if ( l[i] / (double)v1 < ( l.back() - l[i] ) / (double)v2 )
			{
				res = i;
			}
			else
			{
				res++;
				break;
			}
		}

		cout << res << endl;
	}

	return 0;
}

C++: #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int dx[] = { -1, 0, 1, 0 }; const int dy[] = { 0, 1, 0, -1 };

int main() {
	int length[10];
	int v1;
	int v2;
	char comma;
	while (cin>>length[0]>>comma>> length[1]>>comma>> length[2]>>comma>> length[3]>>comma>> length[4]>>comma>> length[5]>>comma>> length[6]>>comma>> length[7]>>comma>> length[8]>>comma>>length[9]>>comma>>v1>>comma>>v2){
	double sum=0;
	REP(i,10)
		sum += length[i];
	double time = sum / (double)(v1+v2);
	double go=time*(double)v1;
	REP(i,10){
		if (go <= (double)length[i] + 1e-10){
		cout<<(i+1)<<endl;
		break;
		}else
			go -= (double)length[i];
	}
	}
	return 0;
}

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

void data(int l[], double d_sum[]) {
  puts("===== data =======");
  puts("l\td_sum");
  for(int j = 0; j < 10; ++j) {
	printf("%d\t%lf\n", l[j], d_sum[j]);
  }
  puts("==================");
}

int main() {
  int l[10];
  double d_sum[10];
  int v1, v2;
  double time, d_train1;
  
  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)) {
	for(int i = 0; i < 10; ++i) {
	  if(i == 0) d_sum[i] = l[i];
	  else d_sum[i] = d_sum[i - 1] + l[i];
	}

	//data(l, d_sum);
	
	time = d_sum[9] / (double)(v1 + v2);
	d_train1 = v1 * time;

	for(int j = 0; j < 10; ++j) {
	  if(d_train1 <= d_sum[j]) {
		printf("%d\n", j + 1);
		break;
	  }
	}

	//init
	l[10] = {};
	d_sum[10] = {};
  }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
using namespace std;
int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;}
string itos(int x){stringstream ss;ss<<x;return ss.str();}
const int INF=1111111111;
int main(){

int ta[10],v1,v2,sum=0;
double t,n1,n2;
while(true){
for(int i=0;i<10;i++){cin>>ta[i];cin.ignore();sum+=ta[i];}
char tmp;
if(!(cin>>v1>>tmp>>v2))break;
for(double i=0.0;;i+=0.00001){
	n1=v1*i,n2=sum-v2*i;
	if(abs(n1-n2)<=0.00001){t=i;break;}
}
sum=0;
cout<<v1*t<<endl;
for(int i=0;i<10;i++){;
	if(v1*t<(double)sum){cout<<i<<endl;break;}
	sum+=ta[i];
}
}
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;
  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){
    v1=v2=dis=sdis=adis=0;
    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 <string>
#include <math.h>
#include <stdio.h>
#include <ctype.h>

using namespace std;

int main () {
    double b[10];
    double v1,v2;
    
    while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&b[0],&b[1],&b[2],&b[3],&b[4],&b[5],&b[6],&b[7],&b[8],&b[9],&v1,&v2)){
        double l = b[0]+b[1]+b[2]+b[3]+b[4]+b[5]+b[6]+b[7]+b[8]+b[9];
        double t = l/(v1+v2);
        double l1 = t*v1;
        for(int i=0; i<10; i++){
            l1-=b[i];
            if(l1<=0){
                cout<<i+1<<endl;
                break;
            }
        }
    }
    return 0;
}