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

int main()
{
    float l[11];
    float v1,v2;

    scanf("%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f",
            &l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&l[10],
            &v1,&v2);
    
    float t,la;
    float lsum=0;
    for(int i=1;i<=10;++i){
        //change km to m
        
        lsum+= l[i];
    }
    
    t = lsum/(v1+v2);
    la = v1*t;
    lsum = 0;
    for(int i=1;i<=10;i++)
    {
        lsum += l[i];
        if(lsum >= la){ cout << i << endl; break;}
    }


    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++: //15
#include<iostream>
#include<algorithm>

using namespace std;

int main(){
  double l[12];
  double ls[13]={};
  for(;;){
    for(int i=0;i<12;i++){
      (cin>>l[i]).ignore();
      if(!cin)return 0;
      ls[i+1]=ls[i]+l[i];
    }
    cout<<lower_bound(ls,ls+11,l[10]*ls[10]/(l[10]+l[11]))-ls<<endl;
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <map>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <stack>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define For(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}

int whichSection(double dist, int l1, int l2, int l3, int l4, int l5, int l6, int l7, int l8, int l9, int l10) {
    vector<int> l;
    l.push_back(l1);
    l.push_back(l2);
    l.push_back(l3);
    l.push_back(l4);
    l.push_back(l5);
    l.push_back(l6);
    l.push_back(l7);
    l.push_back(l8);
    l.push_back(l9);
    l.push_back(l10);
    int distFromLeftSec = 0;
    REP(i,10) {
        distFromLeftSec += l[i];
        if (distFromLeftSec >= dist) return i+1;
    }
    return -1;
}

int main() {
    int l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,v1,v2;
    char c;
    while(cin>>l1>>c>>l2>>c>>l3>>c>>l4>>c>>l5>>c>>l6>>c>>l7>>c>>l8>>c>>l9>>c>>l10>>c>>v1>>c>>v2) {
        int dist = l1+l2+l3+l4+l5+l6+l7+l8+l9+l10;
        double time = double(dist) / (v1+v2);
        double distFromLest = time * v1;
        cout << whichSection(distFromLest, l1,l2,l3,l4,l5,l6,l7,l8,l9,l10) << endl;
    }
    return 0;
}

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

using namespace std;

int main(void)
{
    int l[10];
    int a,b;
    while(~scanf("%d,", &l[0])) {
        double sum = 0;
        for(int i=1; i<10; i++) scanf("%d,", &l[i]);
        scanf("%d,%d",&a,&b);
        for(int i=0; i<10; i++) sum += (double)l[i];

        double c=0, d=0;
        int i;
        for(i=0; i<10; i++) {
            c += l[i];
            d += (double)l[i]/a * b;
            if(c + d >= sum) break;
        }

        printf("%d\n", i+1);
    }

    return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	int l[10],v1,v2;
	for(;~scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",l,l+1,l+2,l+3,l+4,l+5,l+6,l+7,l+8,l+9,&v1,&v2);){
		int sum=0;
		int i;
		for(i=0;i<10;i++){
			sum+=l[i];
			//cout<<l[i]<<endl;
		}
		int len=0;
		for(i=0;i<10;i++){
			len+=l[i];
			if(len*v2>=(sum-len)*v1){
				cout<<i+1<<endl;
				break;
			}
		}
	}
	return 0;
}

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

int main(void){
  int a;
  char b;
  vector<int> l;
  while(!cin.fail() && !cin.eof()){
    int ls = 0;
    int v1, v2;
    for(int i = 0; i < 10; i++){
      cin >> a >> b;
      ls += a;
      l.push_back(a);
    }
    cin >> v1 >> b >> v2;
    
    double x = v1 * ((double)ls / ((double)v1 + v2));
    double y = 0.0;

    int cnt = 0;
    while(y < x){
      y += l[cnt];
      cnt++;
    }
    if(cnt != 0)
      cout << cnt << endl;
    l.clear();
  }
  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(1){
      ss.str("");
      ss.clear(stringstream::goodbit);
      
      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=kyori[0];
      for(i=1;i<10;i++){
         if(sum>=p){
            cout<<i<<endl;
            break;
         }
         else
            sum+=kyori[i];
      }
   }
   return 0;
}

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

bool read_data(int* distances, int count, int& velocityA, int& velocityB)
{
	for (int i = 0; i < count; ++i) {
		if (scanf("%d,", &distances[i]) != 1) {
			return false;
		}
	}
	return (scanf("%d,%d", &velocityA, &velocityB) == 2);
}


int main()
{
	const int distance_count = 10;
	int distances[distance_count], velocityA, velocityB;

	while (read_data(distances, distance_count, velocityA, velocityB)) {
		int total_distance = 0;
		for (int i = 0; i < distance_count; ++i) {
			total_distance += distances[i];
		}
		int cross_point = (total_distance * velocityA + velocityA + velocityB - 1) / (velocityA + velocityB);
		int cumulative_distance = 0;
		for (int i = 0; i < distance_count; ++i) {
			cumulative_distance += distances[i];
			if (cross_point <= cumulative_distance) {
				std::cout << (i + 1) << std::endl;
				break;
			}
		}
	}

	return 0;
}