Problem:


Score : 100 points

Problem Statement

X and A are integers between 0 and 9 (inclusive).

If X is less than A, print 0; if X is not less than A, print 10.

Constraints

0 \leq X, A \leq 9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X A

Output

If X is less than A, print 0; if X is not less than A, print 10.

Sample Input 1

3 5

Sample Output 1

0

3 is less than 5, so we should print 0.

Sample Input 2

7 5

Sample Output 2

10

7 is not less than 5, so we should print 10.

Sample Input 3

6 6

Sample Output 3

10

6 is not less than 6, so we should print 10.



Sample input:
3 5


Sample output:
0

Submission status: Runtime Error

Solution code:
/*
    Converted from Scratch by scratch2cpp (https://github.com/yos1up/scratch2cpp).
*/
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
#define debug cerr << "--" << __LINE__ << "--" << "\n"
typedef long long ll;
using namespace std;

class Var{ // NOTE: immutable
public:
    mutable string sval;
    mutable long double dval;
    enum NumericState {UNKNOWN = -1, STRINGY = 0, NUMERIC = 1};
    mutable NumericState numericState;
    mutable bool svalValid, dvalValid; // TODO: initialize at here?

    Var(){
        *this = Var("");
    }
    Var(string s){
        sval = s;
        svalValid = true; dvalValid = false;
        numericState = UNKNOWN;
    }
    Var(long double d){
        dval = d;
        svalValid = false; dvalValid = true;
        numericState = NUMERIC;
    }
    Var(const Var &v){
        sval = string(v.sval); dval = v.dval;
        svalValid = v.svalValid; dvalValid = v.dvalValid;
        numericState = v.numericState;
    }
    void fillDval() const{
        if (dvalValid) return;
        double d;
        bool numeric = isNumericString(sval, &d);
        if (numeric){
            numericState = NUMERIC;
            dval = d;
        }else{
            numericState = STRINGY;
            dval = 0.0;
        }        
        dvalValid = true;
    }
    static bool isNumericString(const string &s, double *ptr) {
        char* ep;
        // cause side-effect: errno can be ERANGE after calling strtod
        *ptr = strtod(s.c_str(), &ep);
        // TODO: support long double (with strtold)
        // Scratch 3.0 recognize the string cause underflows or overflows as Numeric
        return NULL != ep && '\0' == ep[0] && s[0] != '\0';
    }
    bool isNumeric() const{
        fillDval();
        return numericState == NUMERIC;
    }    
    void fillSval() const{
        if (svalValid) return;
        sval = (floor(dval) == dval) ? to_string((ll)dval) : to_string(dval);
        svalValid = true;
    }       
    long double asNumber() const{
        fillDval();
        return dval;
    } 
    string asString() const{
        fillSval();
        return sval;
    }
    Var operator+(const Var &y) const{
        return Var(this->asNumber() + y.asNumber());
    }
    Var operator+=(const Var &y){
        *this = *this + y;
        return *this;
    }
    Var operator-(const Var &y) const{
        return Var(this->asNumber() - y.asNumber());
    }
    Var operator*(const Var &y) const{
        return Var(this->asNumber() * y.asNumber());
    }
    Var operator/(const Var &y) const{
        return Var(this->asNumber() / y.asNumber());
    }
    Var operator%(const Var &y) const{
        return Var(fmod(this->asNumber(), y.asNumber()));
    }
    bool operator<(const Var &y) const{
        if (this->isNumeric() && y.isNumeric()){
            return this->asNumber() < y.asNumber();
        } // compare as number if both can be interpreted as numeric
        return this->asString() < y.asString();
    }
    bool operator>(const Var &y) const{
        return y < *this;
    }
    bool operator==(const Var &y) const{
        if (this->isNumeric() && y.isNumeric()){
            return this->asNumber() == y.asNumber();
        } // compare as numeric if both are numeric
        return this->asString() == y.asString();
    }
    friend ostream& operator << (ostream& os, const Var& p);
    friend istream& operator >> (istream& is, const Var& p);
};
ostream& operator << (ostream& os, const Var& p){
    os << p.asString();
    return os;
}
istream& operator >> (istream& is, Var& p){
    string s; is >> s; p = Var(s);
    return is;
}


Var letterOf(Var index, Var sourceString){
    /* index: 1-origined */
    string str = sourceString.asString();
    int idx = (int)(index.asNumber() - 1);
    // seem to be dirty but Scratch seems to do like this.
    // ex. letterOf(0.01, "world") == "w", letterOf(1.99, "world") == "w", letterOf(5.99, "world") == "d"
    if (0 <= idx && idx < str.size()) return Var(str.substr(idx, 1));
    return Var();
}

class VarList{
public:
    vector<Var> data;
    VarList(const vector<Var> &x) { data = x; }
    void push_back(const Var &x){ data.push_back(x); }
    void pop_back(){ data.pop_back(); }
    void clear(){ data.clear(); }
    int size(){ return (int) data.size(); }
    Var getLineOfList(const Var &index) const{
        /* index: 1-origined */
        int idx = (int)index.asNumber() - 1;
        // (unlike 'letterOf', index==0.9 does not work.)
        if (0 <= idx && idx < data.size()) return data[idx];
        return Var();
    }
    void setLineOfListTo(const Var &index, const Var &v){
        /* index: 1-origined */
        int idx = (int)index.asNumber() - 1;
        if (0 <= idx && idx < data.size()) data[idx] = v;
    }
    void deleteLineOfList(const Var &index){
        /* index: 1-origined */
        string kwd = index.asString();
        if (kwd == "all"){
            data.clear();
        }else if (kwd == "last"){
            data.pop_back();
        }else{
            int idx = (int)index.asNumber() - 1;
            if (0 <= idx && idx < data.size()) data.erase(data.begin() + idx);
        }
    }
    void insertAtIndexOfList(const Var &item, const Var &index){
        /* index: 1-origined */
        int idx = (int)index.asNumber() - 1;
        if (0 <= idx && idx <= data.size()) data.insert(data.begin() + idx, item);   
    }
    void insertAtRandomOfList(const Var &item){
        int idx = rand() % (data.size() + 1);
        data.insert(data.begin() + idx, item);
    }
    string asString() const{
        /* concatenate elements of list with space */
        // TODO: concatenated without spaces only if all elements are single characters.
        // (Is it an official bug? (or feature?))
        string ret;
        for(int i=0;i<data.size();i++){
            if (i > 0) ret += ' ';
            ret += data[i].asString();
        }
        return ret;        
    }
    int itemNumOfList(const Var &item) const{
        auto itr = find(data.begin(), data.end(), item);
        if (itr == data.end()) return 0;
        return 1 + (int)(itr - data.begin());
        /* index: 1-origined */
    }
    friend ostream& operator << (ostream& os, const VarList& p);
};
ostream& operator << (ostream& os, const VarList& p){
    os << p.asString();
    return os;
}

long double randUniform(const long double x, const long double y){
    if (x > y) return randUniform(y, x);
    if (floor(x) == x && floor(y) == y){
        ll xi = (ll)round(x), yi = (ll)round(y);
        return xi + rand() % (yi - xi + 1);
    }else{
        return x + (y - x) * (0.0 + rand()) / RAND_MAX;
    }
}

Var buf_answer; // for "answer"

// ============================= Scripts =============================

// variable declaration
Var var_a(72);
Var var_b(128);
Var var_c(256);
Var var_s("myonmyon");

// list declaration

// prototype declaration of functions
int main();

// contents of functions
int main(){
    cin >> buf_answer;
    var_a = buf_answer;
    cin >> buf_answer;
    var_b = buf_answer;
    cin >> buf_answer;
    var_c = buf_answer;
    cin >> buf_answer;
    var_s = buf_answer;
    cout << Var(Var((var_a + (var_b + var_c)).asString() + Var(" ").asString()).asString() + var_s.asString()) << endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
W,H,x,y=map(int,input().split())
if x/W==y/H or x/W==(H-y)/H or not x or not y:
    print(W*H/2,1)
elif not x or not y:
    print(max(min(x*H,(W-x)*H),min(y*W,(H-y)*W)),0)
"""else:
    print(max(min(x*H,(W-x)*H),min(y*W,(H-y)*W),min(H*H*x/y,H*W-H*H*x/y),min(W*W*y/x,H*W-W*W*y/x)),0)"""

Submission status: Runtime Error

Solution code:
import numpy as np

k = 0


def calc(a):
    return np.sum(a) >= k


def main():
    global k
    n, k = map(int, input().split())
    a = np.array(list(map(int, input().split())))
    answer = 0
    list_pattern = []
    for i1 in range(n):
        for i2 in range(len(a)):
            list_pattern.append(a[i1:i2 + 1])

            # if a[i1:i2 + 1].sum() >= k:
            #     answer += 1
    list_answer = map(calc, list_pattern)
    print(sum(list_answer))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
N,X = list(map(int,input().split(' ')))
L = list(map(int,input().split(' ')))[:N]

p = 0
count = 1

for i in range(1,N):
    p += L[i]
    if p <= X:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    x,n = LI()
    if x < n:
        print(0)
    else:
        print(10)
    return

#B
def B():
    n,x = LI()
    l = LI()
    d = 0
    ans = 1
    for i in range(n):
        d += l[i]
        if d <= x:
            ans += 1
    print(ans)
    return

#C
def C():
    w,h,x,y = LI()
    ans = w*h/2
    k = 0
    if x == w/2 and y == h/2:
        k = 1
    print(ans,k)
    return

#D
def D():
    n,k = LI()
    a = LI()
    b = [a[i] for i in range(n)]
    for i in range(n-1):
        b[i+1] += b[i]
    b.insert(0,0)
    ans = 0
    for l in range(n):
        r = bisect.bisect_left(b,b[l]+k)
        ans += n-r+1
    print(ans)
    return

#E
def E():
    n,m = LI()
    s = LI()
    t = LI()
    dp = [[0 for i in range(m+1)] for j in range(n+1)]
    for i in range(n+1):
        dp[i][0] = 1
    for j in range(m+1):
        dp[0][j] = 1
    for i in range(1,n+1):
        for j in range(1,m+1):
            if s[i-1] == t[j-1]:
                dp[i][j] += dp[i-1][j]+dp[i][j-1]
            else:
                dp[i][j] += dp[i-1][j]+dp[i][j-1]-dp[i-1][j-1]
            if dp[i][j] >= mod:
                dp[i][j] %= mod
    print(dp[n][m]%mod)
    return

#F
def F():
    n = I()
    x = [None for i in range(n)]
    y = [None for i in range(n)]
    f = [None for i in range(n)]
    for i in range(n):
        a,b,d = LS()
        a = int(a)
        b = int(b)
        x[i] = a
        y[i] = b
        if d == "R":
            f[i] = (1,0)
        elif d == "L":
            f[i] = (-1,0)
        elif d == "U":
            f[i] = (0,1)
        else:
            f[i] = (0,-1)
    dx = max(x)-min(x)
    dy = max(x)-min(y)
    ans = dx*dy
    if ans == 0:
        print(0)
        quit()
    l = 0
    r = 100000000
    while r-l > 0.5:
        m = (l+r)/2
        px = [x[i]+f[i][0]*m for i in range(n)]
        py = [y[i]+f[i][1]*m for i in range(n)]
        dx = max(x)-min(x)
        dy = max(x)-min(y)
        if dx*dy < ans:
            ans = dx*dy

    return

#Solve
if __name__ == "__main__":
    E()

Submission status: Runtime Error

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    x,n = LI()
    if x < n:
        print(0)
    else:
        print(10)
    return

#B
def B():
    n,x = LI()
    l = LI()
    d = 0
    ans = 1
    for i in range(n):
        d += l[i]
        if d <= x:
            ans += 1
    print(ans)
    return

#C
def C():
    w,h,x,y = LI()
    ans = w*h/2
    k = 0
    if x == w/2 and y == h/2:
        k = 1
    print(ans,k)
    return

#D
def D():
    n,k = LI()
    a = LI()
    b = [a[i] for i in range(n)]
    for i in range(n-1):
        b[i+1] += b[i]
    b.insert(0,0)
    ans = 0
    for l in range(n):
        r = bisect.bisect_left(b,b[l]+k)
        ans += n-r+1
    print(ans)
    return

#E
def E():
    n,m = LI()
    s = LI()
    t = LI()
    dp = [[0 for i in range(m+1)] for j in range(n+1)]
    for i in range(n+1):
        dp[i][0] = 1
    for j in range(m+1):
        dp[0][j] = 1
    for i in range(1,n+1):
        for j in range(1,m+1):
            if s[i-1] == t[j-1]:
                dp[i][j] += dp[i-1][j]+dp[i][j-1]
            else:
                dp[i][j] += dp[i-1][j]+dp[i][j-1]-dp[i-1][j-1]
            if dp[i][j] >= mod:
                dp[i][j] %= mod
    print(dp[n][m])
    return

#F
def F():
    n = I()
    x = [None for i in range(n)]
    y = [None for i in range(n)]
    f = [None for i in range(n)]
    for i in range(n):
        a,b,d = LS()
        a = int(a)
        b = int(b)
        x[i] = a
        y[i] = b
        if d == "R":
            f[i] = (1,0)
        elif d == "L":
            f[i] = (-1,0)
        elif d == "U":
            f[i] = (0,1)
        else:
            f[i] = (0,-1)
    dx = max(x)-min(x)
    dy = max(x)-min(y)
    ans = dx*dy
    if ans == 0:
        print(0)
        quit()
    l = 0
    r = 100000000
    while r-l > 0.5:
        m = (l+r)/2
        px = [x[i]+f[i][0]*m for i in range(n)]
        py = [y[i]+f[i][1]*m for i in range(n)]
        dx = max(x)-min(x)
        dy = max(x)-min(y)
        if dx*dy < ans:
            ans = dx*dy

    return

#Solve
if __name__ == "__main__":
    E()

Submission status: Runtime Error

Solution code:
l = input().split()
N = int(l[0])
K = int(l[1])

l = input().split()
s = 0
A = []
for i in range(N):
    a = int(l[i])
    s += a
    A.append(a)

B = []
s1 = 0
for i in range(N):
    B.append(s - s1)
    s1 += A[i]
B.append(0)

# print(N, K, A, B)

ans = 0
for i in range(N):
    b = B[i]
    if b < K:
        break
    small = 0
    large = N
    j = (small + large)//2
    while True:
        index = N - 1 - j
        # print(i, j, b, index, B[index], B[index + 1], small, large)
        if b - B[index] < K and b - B[index + 1] >= K:
            # print(ans, i, j)
            ans += j + 1
            break
        if b - B[index] < K:
            large = j
            j = (small + large)//2
        else:
            small = j
            j = (small + large)//2

print(ans)

Submission status: Runtime Error

Solution code:
# 尺取り法
import sys

def input():
    return sys.stdin.readline()[:-1]

N, K = map(int, input().split())
a = list(map(int, input().split()))

count = 0
right = 0
sum = 0
for left in range(N):
    while(sum < K):
        if right == N:
            break
        else:
            sum += a[right]
            right += 1
    if sum < K:
        break
    count += N - right + 1
    sum -= a[left]

print(count)

Submission status: Runtime Error

Solution code:
X, A = map(int, input().split)

if X < A:
    print('{}'.format('0'))
else:
    print('{}'.format('10'))

Submission status: Runtime Error

Solution code:
inp=input().split(' ')
L=input().split(' ')
n=int(inp[0])
l=0;
count=1;
for i in range(n):
  l+=int(L[i])
  if l<=int(inp[1]):
    count+=1
  else:
    print(count)
if count==n+1:
  print(n+1)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
L=[int(i) for i in input().split()]

sumL=[None for i in range(n)]
sumL[0] = L[0]
for i in range(len(L)-1):
    sumL[i+1] = sumL[i] + L[i+1]

res=0

step=0
lenL=len(sumL)

for q in range(lenL):
    step=0
    for nums in sumL:
        step+=1
        if nums>=k:
            #print(len(sumL)-step+1)
            res+=lenL-step+1
            break
    else:
        break
    #print(sumL)
    sumL=sumL[step-1:]
    #print(sumL)
    lenL-=step-1
    k+=L[q]
    
    
    
print(res)

Submission status: Runtime Error

Solution code:
inp=input().split(' ')
L=input().split(' ')
n=int(inp[0])
l=0;
count=1;
for i in range(n):
  l+=int(L[i])
  if l<=int(inp[1]):
    count+=1;
  else:
    print(count)
if count==n+1:
  print(n+1)

Submission status: Runtime Error

Solution code:
X=list(map(int,input().split()))[1]
L=list(map(int,input().split()))
i=0
d=0
while True:
    if d>=X:
        break
    else:
        d+= L[i]
        i+= 1
print(i+1)

Submission status: Runtime Error

Solution code:
x,a = map(int(input.split()))
if x<a:
  print(0)
else :
  print(10)

Submission status: Runtime Error

Solution code:
W, H, x, y = map(int, input().split())
 
print((H * W) / 2, end=" ")
 
if W / 2 == x and H /2 == y:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!

W,H,x,y =  list(map(float,input().split()))


if(W%x==0 and H%y==0):
    print (W*H/2,1)

else:
    print (W*H/2,0)

Submission status: Runtime Error

Solution code:
W, H, x, y = map(int, input().split())
s = H*W/2

if x*2 == W and y*2 == H:
    print(s, 1)
else:
    print(s, 0)

Submission status: Runtime Error

Solution code:
w, h, x, y = input().split()
w, h, x, y = int(w), int(h), int(x), int(y)
if (x==0) or (y==0) or (x==w/2) or (y==h/2) or (x==w) or (y==h):
    if (x==w/2) and (y==h/2):
        print(w*h/2, 1)
    else:
        print(w*h/2, 0)
else:
    if (x < w/2) and (y < h/2):
        p = (h-y)/(w-x)
        x_pos = (p*x-y)/p
        print((w-x_pos)*h/2, 0)
    elif (x > w/2) and (y < h/2):
        p = (h-y)/-x
        x_pos = (p*x-y)/p
        print(x_pos*h/2, 0)
    elif (x < w/2) and (y > h/2):
        p = -y/(w-x)
        x_pos = (h-y+p*x)/p
        print((w-x_pos)*h/2, 0)
    elif (x > w/2) and (y > h/2):
        p = y/x
        x_pos = (h-y+p*x)/p
        print(x_pos*h/2, 0)

Submission status: Runtime Error

Solution code:
c=list(map(int, input().split()))

W = c[0]
H = c[1]
x = c[2]
y = c[3]



if W*y < W*H / 2:
    S1 = W*y
elif W*y == W*H / 2:
    S1 = int(W*y)
else:
    S1 = W*H - W*y

if H*x < W*H / 2:
    S2 = H*x
elif H*x == W*H / 2:
    S2 = int(H*x)
else:
    S2 = W*H - H*x

if S1 < S2:
    Sm = S2
    co = 0
elif S1 > S2:
    Sm = S1
    co = 0
else:
    Sm = S1
    co = 1
    
print(Sm,co)

Submission status: Runtime Error

Solution code:
import sys

w, h, x, y = input().split()
w = float(w)
h = float(h)
x = float(x)
y = float(y)
s=0

for i in range(100000000):
  a=i/1000
  if a<=h/w:
    cand=w*(a*w-2*a*x+2*y)/2
    s_cand=min(cand,w*h-cand)
    if s_cand>s:
      s=s_cand
  else:
    cand=h*(h+2*a*x-2*y)/(2*a)
    s_cand=min(cand,w*h-cand)
    if s_cand>s:
      s=s_cand
      
if w/2==x and h/2==y:
  print(w*h/2, 1)
else:
  print(s,0)

Submission status: Runtime Error

Solution code:
W, H, x, y = map(int, input().split())

if (W==0)or(H==0):
    print(float(0))
    print(1)
else:
    if ((y*W-x*H)/W==float(0))or((y*W+x*H)/W==float(H)):
        print(H*W/2)
        print(1)
    else:
        print(H*W/2)
        print(0)

Submission status: Runtime Error

Solution code:
c=list(map(int, input().split()))

W = c[0]
H = c[1]
x = c[2]
y = c[3]



if W*y < W*H / 2:
    S1 = W*y
elif W*y == W*H / 2:
    pass
else:
    S1 = W*H - W*y

if H*x < W*H / 2:
    S2 = H*x
elif H*x == W*H / 2:
    pass
else:
    S2 = W*H - H*x

if S1 < S2:
    Sm = S2
    co = 0
elif S1 > S2:
    Sm = S1
    co = 0
else:
    Sm = S1
    co = 1
    
print(Sm,co)

Submission status: Runtime Error

Solution code:
X, A = map(int, input().split())
if X >= A:
  return 10
else:
  return 0

Submission status: Runtime Error

Solution code:
W, H, x, y = map(int, input().split())

one =  W * (H-y)
two = x * H
three = 0
same = 0
if x==0 and y==0:
  three = (W*H)/2
if x==W and y==H:
  three = (W*H)/2
if x==0 and y==H:
  three = (W*H)/2
if x==W and y==0:
  three = (W*H)/2

if W == H:
  if x==y:
    three = (W*H)/2
  elif x==(W+1)-y:
    three = (W*H)/2
  

if x == W/2 and y == H/2:
  same = 1

print(max(one, two, three), same)

Submission status: Runtime Error

Solution code:
W,H,x,y = map(int,input().split())
if x==0 or x==W or y==0 or y==H:
  s = H*W/2
  print('{:.10f}'.format(s))
else:
  a = min(x*H,(W-x)*H)
  b = min(y*W,(H-y)*W)
  s = max(a,b)
  print('{:.10f}'.format(s))
if x==0 and y==0:
  print(0)
elif x==W and y==0:
  print(0)
elif x==0 and y==H:
  print(0)
elif x==W and y==H:
  print(0)
elif y == H*x/W or y == (-1)*H*x/W:
  print(1)
else:
  print(0)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
L = list(map(int,input().split()))
count=1
D=0
for i in range(n):
    if D>x:
        print(count)
        break
    else:
        D=D+L[i]     
        count+=1

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(1000000)
 
N,K = map(int,input().split())
a = list(map(int,input().split()))

b = []
b.append(0)

now = 0

for i in range(N):
    now = now + a[i]
    b.append(now)
    
ans = 0
#cur = N

for i in range(N):
    for j in range(i,N+1):
        if N - j < 0:
            break
        if K <= b[N-i] - b[N-j]:
            ans += N - j + 1
            #print(ans)
            break
        else:
            #cur = cur - j
            continue
            
print(ans)

Submission status: Runtime Error

Solution code:
N,K = map(int, input().split())
A_list = [int(i) for i in input().split()]


sum_tmp = 0
Answer = 0

if N==1 : Answer = 0

else :
    for i in range(N):
        sum_tmp = A_list[i]
        for j in range(i+1,N):
            sum_tmp += A_list[j]
            #print(sum_tmp)
            if sum_tmp < K:
                continue
            else:
                Answer += N - j
                #print('answer += {0:5d}'.format(N-j))
                break

print(Answer)

Submission status: Runtime Error

Solution code:
import sys

def input():
    return sys.stdin.readline()[:-1]

N, K = map(int, input().split())
a = list(map(int, input().split()))

from itertools import accumulate
count = 0
acum = list(accumulate(a))

for i in range(N-1, -1, -1):
    if acum[i] >= K:
        count += 1
    else:
        break

for i in range(N):
    for j in range(N-1, i, -1):
        s = acum[j]-acum[i]
        if s >= K:
            count += 1
        else:
            break

print(count)

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
W = a[0]
H = a[1]
x = a[2]
y = a[3]
#W,H,x,y = list(map(int,input().split(" ").rstrip("")))
#print(W,H,x,y)
#横にラインを引く
if x ==0 or x == W:
    tatemax = 0
    yokomax = W*H/2.0
if y== 0 or y == H:
    tatemax = W*H/2.0
    yokomax = 0
if x !=0 and x != W and y!= 0 and y != H:       
    if float(y) > float(H)/2.0:
        yokomax = float(W) * float((H-y))
        
    elif float(y) < float(H)/2.0:
        yokomax = float(W) * float(y)
        
    elif float(y) == float(H)/2.0:
        yokomax = float(W) * float(y)

    if float(x) > float(W)/2.0:
        tatemax = float(H) * float((W-x))
        
    elif float(x) < float(W)/2.0:
        tatemax = float(H) *float(x)
        
    elif float(x) == float(W)/2.0:
        tatemax = float(H) * float(x)
if W!=H:
    if yokomax == tatemax:
    #    print(max(yokomax,tatemax),'1')   
        print('{:.12e}'.format(max(yokomax,tatemax)),'1')
    else:
    #    print(max(yokomax,tatemax),'0')
        print('{:.12e}'.format(max(yokomax,tatemax)),'0')
elif W ==H:
    if x !=0 and x != W and y!= 0 and y != H:
        print('{:.12e}'.format(max(yokomax,tatemax)),'1')

Submission status: Runtime Error

Solution code:
W,H,x,y=map(int,input().split())

#case1
a=x*H
b=(W-x)*H

if a>=b:
    case1=b
else:
    case1=a

#case2
c=W*y
d=W*(H-y)

if c>=d:
    case2=d
else:
    case2=c

if case1==case2:
    z=1

else:
    z=0

print("{0:.6f}".format(max(case1,case2)),z)

Submission status: Runtime Error

Solution code:
c=list(map(int, input().split()))

W = c[0]
H = c[1]
x = c[2]
y = c[3]



if W*y <= W*H / 2:
    S1 = W*y
else:
    S1 = W*H - W*y

if H*x <= W*H / 2:
    S2 = H*x
else:
    S2 = W*H - H*x

if S1 < S2:
    Sm = S2
    co = 0
elif S1 > S2:
    Sm = S1
    co = 0
else:
    Sm = S1
    co = 1
    
print(float(Sm),co)

Submission status: Runtime Error

Solution code:
W,H,x,y=map(str,input().split())

#case1
a=x*H
b=(W-x)*H

if a>=b:
    case1=b
else:
    case1=a

#case2
c=W*y
d=W*(H-y)

if c>=d:
    case2=d
else:
    case2=c

if case1==case2:
    z=1

else:
    z=0

print("{0:.9f}".format(max(case1,case2)),z)

Submission status: Runtime Error

Solution code:
def inpl(): return list(map(int, input().split()))
W, H, x, y = inpl()
if x > W/2:
    x = W-x
if y > H/2:
    y = H-y

a = W*y
b = H*x
if x == 0 or y == 0:
    print(H*W/2, 0)
elif W/H == x/y:
    print(H*W/2, int(W/2==x))
elif a == b:
    print(a, 1)
    raise
elif a > b:
    print(a, int(2*x == W))
else:
    print(b, int(2*y == H))

Submission status: Runtime Error

Solution code:
c=list(map(int, input().split()))

W = c[0]
H = c[1]
x = c[2]
y = c[3]



if W*y <= float(W*H)/2:
    S1 = W*y
else:
    S1 = W*H - W*y

if H*x <= float(W*H)/2:
    S2 = H*x
else:
    S2 = W*H - H*x

if S1 < S2:
    Sm = S2
    co = 0
elif S1 > S2:
    Sm = S1
    co = 0
else:
    Sm = S1
    co = 1
    
print(Sm,co)

Submission status: Runtime Error

Solution code:
import itertools

n, k = map(int, input().split())
a = map(int, input().split())
accum = [0] + list(itertools.accumulate(a))
count = 0
for i in range(n):
    for j in range(i + 1, n + 1):
        if accum[j] - accum[i] >= k:
            count += 1
print(count)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
L = list(map(int,input().split()))
count=0
D=0
for i in range(n+1):
    if D>x:
        print(count)
        break
    else:
        D=D+L[i]     
        count+=1

Submission status: Runtime Error

Solution code:
c=list(map(int, input().split()))

W = c[0]
H = c[1]
x = c[2]
y = c[3]



if W*y <= float((W*H)/2):
    S1 = W*y
else:
    S1 = W*H - W*y

if H*x <= float((W*H)/2):
    S2 = H*x
else:
    S2 = W*H - H*x

if S1 < S2:
    Sm = S2
    co = 0
elif S1 > S2:
    Sm = S1
    co = 0
else:
    Sm = S1
    co = 1
    
print(Sm,co)

Submission status: Runtime Error

Solution code:
W,H,x,y = map(int,input().split())
if x==0 or x==W or y==0 or y==H:
  s = H*W/2
  print('{:.10f}'.format(s))
else:
  a = min(x*H,(W-x)*H)
  b = min(y*W,(H-y)*W)
  s = max(a,b)
  print('{:.10f}'.format(s))
if y == H*x/W:
  print(1)
else:
  print(0)

Submission status: Runtime Error

Solution code:
nx = [int(e) for e in input().split()]
ll = [int(e) for e in input().split()]

n = nx[0]   # バウンド回数
x = nx[1]   # 終点
point = 0   # バウンド位置
count = 0   # バウンド回数

if point <= x:
    count += 1

while point <= x:

    if count == n:
        break
    point += ll[count - 1]
    count += 1
    if point > x:
        count -= 1
        break

if count == n:
    count = n
print(count)

Submission status: Runtime Error

Solution code:
N,X = map(int,input().split(" "))
L = list(map(int,input().split(" ")))
D = 0
ans = 0

for i in range(N):
  if D <= X:
    D += L[i]
    ans += 1
  else:
    break
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np

ina = input()
N = int(ina)
x_list = []
y_list = []
dx_list = []
dy_list = []
for i in range(N):
  x,y,d = input().split()
  x_list.append(float(x))
  y_list.append(float(y))
  if d == 'L':
  	dx_list.append(-1)
  	dy_list.append(0)
  elif d == 'R':
  	dx_list.append(1)
  	dy_list.append(0)
  elif d == 'D':
  	dy_list.append(-1)
  	dx_list.append(0)
  elif d == 'U':
  	dy_list.append(1)
  	dx_list.append(0)


x = np.array(x_list)
y = np.array(y_list)
dx = np.array(dx_list)
dy = np.array(dy_list)

min_obj = (max(x)-min(x)) * (max(y)-min(y))

t = 0
t_min = 0
for t in range(1, 10000):
  x = x + dx*0.1
  y = y + dy*0.1
  obj = (max(x)-min(x)) * (max(y)-min(y))
  if obj < min_obj:
    min_obj = obj
    t_min = t
  if t_min + 500 < t:
    break
print(min_obj)

Submission status: Runtime Error

Solution code:
W,H,x,y = list(map(int,input().split(" ")))
#print(W,H,x,y)
#横にラインを引く
if x ==0 or x == W:
    tatemax = 0
    yokomax = W*H/2.0
if y== 0 or y == H:
    tatemax = W*H/2.0
    yokomax = 0
if x !=0 and x != W and y!= 0 and y != H:       
    if float(y) > float(H)/2.0:
        yokomax = float(W) * float((H-y))
    elif float(y) < float(H)/2.0:
        yokomax = float(W) * float(y)
    elif float(y) == float(H)/2.0:
        yokomax = float(W) * float(y)

    if float(x) > float(W)/2.0:
        tatemax = float(H) * float((W-x))
    elif float(x) < float(W)/2.0:
        tatemax = float(H) *float(x)
    elif float(x) == float(W)/2:
        tatemax = float(H) * float(x)
if yokomax == tatemax: 
    print(max(yokomax,tatemax),'1')   
#    print('{:.12e}'.format(max(yokomax,tatemax)),'1')
else:
    print(max(yokomax,tatemax),'0')
#    print('{:.12e}'.format(max(yokomax,tatemax)),'0')

Submission status: Runtime Error

Solution code:
W,H,x,y = list(map(int,input().split(" ")))
print(W,H,x,y)
#横にラインを引く
if x ==0 or x == W:
    tatemax = 0
    yokomax = W*H/2.0
if y== 0 or y == H:
    tatemax = W*H/2.0
    yokomax = 0
if x !=0 and x != W and y!= 0 and y != H:       
    if float(y) > float(H)/2.0:
        yokomax = float(W) * float((H-y))
    elif float(y) < float(H)/2.0:
        yokomax = float(W) * float(y)
    elif float(y) == float(H)/2.0:
        yokomax = float(W) * float(y)

    if float(x) > float(W)/2.0:
        tatemax = float(H) * float((W-x))
    elif float(x) < float(W)/2.0:
        tatemax = float(H) *float(x)
    elif float(x) == float(W)/2:
        tatemax = float(H) * float(x)
if yokomax == tatemax: 
    print('{:.12e}'.format(max(yokomax,tatemax)),'1')
else:
    print('{:.12e}'.format(max(yokomax,tatemax)),'0')

Submission status: Runtime Error

Solution code:
n, k = map(int,input().split())
lst = list(map(int, input().split()))
#cnt = 0
ans = []
"""
def arr(m,a):
  if m==n:
    print(a+sum([1 for j in range(n) if not j+m>n and sum(lst[j:j+m])>=k]))
    return
  return arr(m+1,a+sum([1 for j in range(n) if not j+m>n and sum(lst[j:j+m])>=k]))
  
arr(1,0)
"""

for i in range(1,n+1):
  ans += [1 for j in range(n) if not j+i>n and sum(lst[j:j+i])>=k]
print(sum(ans))
"""
  for j in range(n):
    if j+i > n:
      continue
    if sum(lst[j:j+i]) >= k:
      cnt += 1
      #print(j,j+1,sum(lst[j:j+i]),cnt)
"""

#ans += [lst[j] for j in lst if sum(lst) >= k:]

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

x, a = int(input()), int(input())

if x < a:
    print("0")
else:
    print("10")