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

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

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

#define loop(i,a,b) for(int i=(a);i<int(b);i++)
#define rep(i,b) loop(i,0,b)

int main(){
	vector<int> l(10);
	vector<int> v(2);
	char c;
	
	while(cin>>l[0]){
		rep(i,9) cin >> c >> l[i+1];
		rep(i,2) cin >> c >> v[i];
		double sum = 0,sum2=0,sum3=0;
		rep(i,l.size()) sum += l[i];
		rep(i,v.size()) sum2 += v[i];
		rep(i,l.size()) {
			sum3+=l[i];
			if(sum3/sum>v[0]/sum2){
				cout << i+1 << endl;
				break;
			}
		}
	}
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int main()
{
//	cut here before submit 
//	freopen ("testcase.RL", "r", stdin );
	string str = "";
	while (getline (cin, str ) ){
		if (str.empty() ) break;
		int n = str.length();
		rep (i, n ){
			if (str[i] == ',' ) str[i] = ' ';
		} // end rep
		vector<int> l (12, 0 ), sum (12, 0 );
		int v1, v2;
		stringstream ss (str );
		for (int i = 1; i <= 10; i++ ){
			ss >> l[i];
		} // end rep
		l[11] = 100000;
		ss >> v1 >> v2;
		for (int i = 1; i <= 11; i++ ){
			sum[i] = sum[i-1] + l[i];
		} // end for

		cerr << "sum: " << endl;
		rep (i, 10+1 ){
			cerr << sum[i] << (i != 10 ? ' ' : '\n' );
		} // end rep

		double t = (double)sum[10]/(double)(v1 + v2 );
		cerr << "t: " << t << endl;
		double cl = (double)v1*t;
		cerr << "cl: " << cl << endl;
		int res = 0;
		for (int i = 1; i <= 10; i++ ){
			if (sum[i-1] < (int)cl && (int)cl <= sum[i] ){
				res = i;
				break;
			} // end if
		} // end for
		printf ("%d\n", res );

	} // end loop

		
	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int i;
	double l[16];
	double v[2];
	double vi;
	double total;
	double t;
	
	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], &v[0], &v[1]) != EOF){
		total = 0;
		for (i = 0; i < 10; i++){
			total += l[i];
		}
		vi = v[0] + v[1];
		t = total / vi;
		t = v[0] * t;
		
		total = 0;
		for (i = 0; i < 10; i++){
			total += l[i];
			if (t <= total){
				printf("%d\n", i + 1);
				break;
			}
		}
	}
	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,ret;
	double h,sum=0;
	vector<int> l(10, 0);
	while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&l[10],&v1,&v2) != EOF) {
		for (int i=0; i<10; i++) {
			sum += l[i];
		}
		sum /= (v1+v2);
		sum *= v1;
		for (int i=0; i<10; i++) {
			sum -= l[i];
			if (sum <= 0) {
				ret = i;
				break;
			}
		}
		cout << ret << endl;
	}
	return 0;
}

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

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