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 <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; ++i)
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define P pair<int, int>
const int N = 10;

int v[N], a, b;

int solve(){
  double d = 0, sum = 0;
  REP(i, N) sum += v[i];
  bool f = false;
  if(a < b){
    swap(a, b);
    REP(i, N / 2) swap(v[i], v[N - 1 - i]);
    f = true;
  }
  REP(i, N - 1){
    double st = d / a, et = (d + v[i]) / a, sb = min(sum - b * et, sum - b * st), eb = max(sum - b * et, sum - b * st);
    //cout <<i + 1 <<" | " <<st <<", " <<et <<" | " <<d <<", " <<d + v[i] <<", " <<sb <<", " <<eb <<endl;
    if((eb >= d && eb <= d + v[i]) || (sb >= d && sb <= d + v[i])) return (f ? N - 1 - i : i + 1);
    d += v[i];
  }
  return (f ? 1 : 10);
}

int main() {
  while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &v[0], &v[1], &v[2], &v[3], &v[4], &v[5], &v[6], &v[7], &v[8], &v[9], &a, &b) != EOF) cout <<solve() <<endl;
  return 0;
}

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

int main(){
  double a[10], v1, v2;
  double t1[11], t2[11];
  int cross;
  char k;
  int i;

  while(cin>>a[0]){
    for(i=1; i<10; i++) cin>>k>>a[i];
    cin>>k>>v1>>k>>v2;
    t1[0]=0;
    for(i=1; i<11; i++) t1[i]=t1[i-1]+a[i-1]/v1;
    t2[10]=0;
    for(i=9; i>=0; i--) t2[i]=t2[i+1]+a[i]/v2;
    for(i=1; i<11; i++){
      if(t1[i]>=t2[i]){
        cross=i; break;
      }
    }
    printf("%d\n", cross);
  }

  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<cstring>
#include<vector>
#include<map>
#include<sstream>
#include<algorithm>
using namespace std;

int main(){
   
   int i,n,sum;
   int f1,f2;
   double a,b,p;
   
   vector<int> kyori;
   stringstream ss;
   string str;
   char s;
   
   while(getline(cin,str)){
      
      kyori.clear();
      sum=0;
      ss<<str;
   
      for(i=0;i<10;i++){
         ss>>n>>s;
         kyori.push_back(n);
      }
      ss>>f1>>s>>f2;
   
      for(i=0;i<10;i++) sum+=kyori[i];
      
      a = f1*sum; b = f1+f2;
      p = a/b;
      
      sum=0;
      for(i=0;i<10;i++){
         if(sum>=p){
            cout<<i<<endl;
            break;
         }
         else
            sum+=kyori[i];
      }
      ss.str("");
      ss.clear(stringstream::goodbit);
   }
   return 0;
}

C++: #include <iostream>
#include <string>
#include <array>

using namespace std;

int main()
{
  array< double, 10 > distance;
  int speed1 = 0, speed2 = 0, sum = 0;
  double dis;
  char tmp;
  while ( cin >> distance[0] >> tmp >>distance[1] >> tmp >>
                distance[2] >> tmp >> distance[3] >> tmp >>
                distance[4] >> tmp >> distance[5] >> tmp >>
                distance[6] >> tmp >> distance[7] >> tmp >>
                distance[8] >> tmp >> distance[9] >> tmp >>
                speed1 >> tmp >> speed2 )
  {
        for ( int j = 0 ; j < 10 ; j++ ) sum += distance[j];
        dis = 1.0 * speed1 * sum / ( speed1 + speed2 );
        sum = 0;
        for ( int k = 0 ; k < 10 ; k++ )
        {
                sum += distance[k];
                if ( sum >= dis )
                {
                        cout << k+1 << endl;
                        break;
                }
        }
        sum = 0;
  }

  return 0;
}

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

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

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

using namespace std;

int main(){
    vector<int> v(10);
    int sp1, sp2;
    double all=0;

    while(cin>>v.at(0)){
        for(int i=1; i<10; i++){
            cin>> v.at(i);
        }
        cin>> sp1>> sp2;

        for(int i=0; i<10; i++){
            all += v.at(i);
        }

        double hour = all/(sp1+sp2);
        double len = sp1*hour;

        int k = 0;
        while(len>0){
            len -= (double)v.at(k);
            k++;
        }

        cout<< k<< endl;
    }

    return 0;
}

C++: #include <stdio.h>

int main(){
double v1,v2,t,x;
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;
for(i=0,i<10;i++){
x+=a[i];
}
t=(v1)/(v1+v2);
x=x*t;
for(i=0;x>0;i++){
x-=a[i];
}
printf("%d\n",i+1);
}
return 0;
}

C++: #include<cstdio>

using namespace std;

int main(void){
	
	int l[10];
	int v1,v2;
	
	while(scanf("%d,", &l[0]) != EOF){
		
		int tl = 0;
		int v1l = 0,v2l = 0;
		for(int i = 1; i < 10; i++){
			scanf("%d,", &l[i]);
		}
		scanf("%d,%d", &v1, &v2);
		
		for(int i = 0; i < 10; i++){
			l[i]*=100;
		}
		for(int i = 0; i < 10; i++){
			tl += l[i];
		}
		
		int cnt = 0;
		
		while(v1*cnt+v2*cnt < tl)cnt++;
		
		tl = 0;
		
		for(int i = 0;; i++){
			if(tl+l[i] >= v1*cnt){
				printf("%d\n",i+1);
				break;
			}else{
				tl+=l[i];
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <cstdio>
#include <math.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 e=0.0001;
		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 <iostream>
using namespace std;

int main() {
	int v1, v2;
	int l[10];
	int ls;
	char c;
	while (cin >> l[0] >> c) {
		for (int i=1; i<10; i++)
			cin >> l[i] >> c;
		cin >> v1 >> c >> v2;

		ls = 0;
		for (int i=0; i<10; i++)
			ls += l[i];
		
		double in = ((double)v1)/(v1+v2)*ls;
		int dis = 0;
		for (int i=0; i<10; i++) {
			dis += l[i];
			if ((double)dis >= in) { cout << i+1 << endl; break; }
		}
	}
	return 0;
}

C++: #include <stdio.h>
 
int main(){
    int tr[10],v1,v2;
   
    while(~scanf("%d",&tr[0])){
        double a = 0;
        int sum = tr[0];
        for(int i = 1 ; i < 10 ; i++){
            scanf(",%d",&tr[i]);
            sum += tr[i];
        }
        scanf(",%d,%d",&v1,&v2);
         
        a = v1*((double)sum/(v1+v2));
         
        sum = 0;
        for(int i = 0 ; i < 10 ; i++){
            sum += tr[i];
            if(a <= sum){
                printf("%d\n" ,i+1);
                break;
            }
        }
    }
    return 0;
}