Problem:


Score: 100 points

Problem Statement

In this problem, a date is written as Y-M-D. For example, 2019-11-30 means November 30, 2019.

Integers M_1, D_1, M_2, and D_2 will be given as input.

It is known that the date 2019-M_2-D_2 follows 2019-M_1-D_1.

Determine whether the date 2019-M_1-D_1 is the last day of a month.

Constraints

Both 2019-M_1-D_1 and 2019-M_2-D_2 are valid dates in the Gregorian calendar.

The date 2019-M_2-D_2 follows 2019-M_1-D_1.

Input

Input is given from Standard Input in the following format:

M_1 D_1
M_2 D_2

Output

If the date 2019-M_1-D_1 is the last day of a month, print 1; otherwise, print 0.

Sample Input 1

11 16
11 17

Sample Output 1

0

November 16 is not the last day of a month.

Sample Input 2

11 30
12 1

Sample Output 2

1

November 30 is the last day of November.



Sample input:
11 16
11 17


Sample output:
0

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = 1
x = -1
y = -1
z = -1
for i in range(n):
    pos = a[i]
    if pos == 0:
        if x == -1:
            num = 3
            x = 1
        elif y == -1:
            num = 2
            y = 1
        else:
            num = 1
            z = 1
        ans *= num
    else:
        num = 0
        if x == pos:
            num += 1
            x += 1
        elif y == pos:
            num += 1
            y += 1
        elif z == pos:
            num += 1
            z += 1
        ans *= num
print(ans%1000000007)

Submission status: Runtime Error

Solution code:
def main():
    # input
    n = int(input())
    s = input()

    ans = 0
    for i in range(0, 1000):
        num = str(i)
        num = '0'*(3-len(num))+num
        index = 0
        for i in s:
            if index == 3:
                ans += 1
                break
            elif num[index]==i:
                index += 1
        else:
            if index == 3:
                ans += 1

    print(ans)

    # calc


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
def main():
    # input
    n = int(input())
    s = input()

    ans = 0
    for i in range(0, 1000):
        num = str(i).rjust(3, '0')
        index = 0
        for i in s:
            if index == 3:
                ans += 1
                break
            elif num[index]==i:
                index += 1
        else:
            if index == 3:
                ans += 1

    print(ans)

    # calc


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
T1, T2 = map(int, input().split())
A1, A2 = map(int, input().split())
B1, B2 = map(int, input().split())

D1 = T1 * A1 - T1 * B1
D2 = T1 * A1 + T2 * A2 - T1 * B1 - T2 * B2

if D1 * D2 > 0:
    print(0)
elif D2 == 0:
    print("infinity")
else:
    c = 1
    D1 = abs(D2 - D1)
    D2 = abs(D2)
    Dp = D2
    while True:
        Dp += D2
        if Dp > D1:
            break
        elif Dp == D1:
            c += 1
            break
        c += 2
    print(c)

Submission status: Runtime Error

Solution code:
a=int(input())
b=input()
count=0
for i in range(1000):
  flag=False
  for j in range(a):
    if b[j]=='{0:03d}'.format(str(i))[0]:
      x=j
      flag=True
      break
  if flag:
    flag=False
  else:
    continue
  for k in range(x+1,a):
    if b[k]=='{0:03d}'.format(str(i))[1]:
      y=k
      flag=True
      break
  if flag:
    flag=False
  else:
    continue
  for l in range(y+1,a):
    if b[l]=='{0:03d}'.format(str(i))[1]:
      count+=1
      break
print(count)

Submission status: Runtime Error

Solution code:
def is_cross(la, lb, x1, x2):
    ya1 = la[0] * x1 + la[1]
    ya2 = la[0] * x2 + la[1]
    yb1 = lb[0] * x1 + lb[1]
    yb2 = lb[0] * x2 + lb[1]
    if ya1 == yb1:
        return False
    return (ya1 - yb1) * (ya2 - yb2) <= 0

def get_line(c, x, y):
    return [c, y - c * x]

t = list(map(int, input().split()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))
xa = sum([ti * ai for ti, ai in zip(t, a)])
xb = sum([ti * bi for ti, bi in zip(t, b)])
if xa / sum(t) == xb / sum(t):
    print('infinity')
else:
    ans = 0
    t_pre = 0
    da = 0
    db = 0
    while(True):
        ans_t = 0
        for ti, ai, bi in zip(t, a, b):
            t_post = t_pre + ti
            la = get_line(ai, t_pre, da)
            lb = get_line(bi, t_pre, db)
            ans_t += is_cross(la, lb, t_pre, t_post)
            t_pre = t_post
            da += ti * ai
            db += ti * bi

        if ans_t == 0:
            break
        ans += ans_t
    print(ans)

Submission status: Runtime Error

Solution code:
n= int(input())
s = input()
ans = 0
for i in range(10):
  ii = s.find(str(i))
  if -1 == ii:
    continue
  for j in range(10):
    ij = s.find(str(j), ii+1)
    if -1 == ij:
      continue
    for k in range(10):
      ik = s.find(str(k), ij+1)
      if ik != -1:
        ans += 1
      
print(ans)

Submission status: Runtime Error

Solution code:
M1,D1=map(int,input().split())
if M1== 1 or 3 or 5 or 7 or 8 or 10:
 	if D1=31:
    	print(1)
    else:
    	print(0)
elif M1== 4 or 6 or 9 or 11 :
	if D1=30:
    	print(1)
    else:
    	print(0)
else:
	if D1 ==28:
      	print(1)
    else:
    	print(0)

Submission status: Runtime Error

Solution code:
n = int(input())
if n % 615 == 0:
	print(1)
else:
	if n%100 == 0 or n%101==0 or n%102 == 0 or n%103==0 or n%104==0 or n%105==0:
		print(1)
	elif n%209==0 or n%206==0 or n%207==0 or n%208==0 or n%201 ==0 or n%202 == 0 or n%203==0 or n%204 == 0 or n%205 == 0:
		print(1)
	else:
		print(0)

Submission status: Runtime Error

Solution code:
M1,D1=map(int,input().split())
if M1== 1 or 3 or 5 or 7 or 8 or10:
 	if D1=31:
    	print(1)
    else:
    	print(0)
elif M1== 4 or 6 or 9 or 11
	if D1=30:
    	print(1)
    else:
    	print(0)
else:
	if D1 ==2:
      	print(1)
    else:
    	print(0)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

N = int(input())
A = (N*100)%108
N = N*100/108

if A == 0:
  print(int(N))
else:
  print(":(")

Submission status: Runtime Error

Solution code:
import itertools
n = int(input())
s = tuple(map(int, input()))
a = tuple(set(itertools.combinations(s, 3)))
ans = len(a)
print(ans)

Submission status: Runtime Error

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

         
if int(s1[0])+1 == int(s2[0]):
         print(1)
else:
         print(0)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = 1
for i in range(n):
    z = a[i]
    if z == 0:
        num = 3
        for j in range(0,i):
            if z == a[j]:
              num -= 1
        ans *= num
    else:
        num = 0
        for j in range(0,i):
            if z-1 == a[j]:
                num += 1
            if z == a[j]:
                num -= 1
        ans *= num
print(ans%1000000007)

Submission status: Runtime Error

Solution code:
n = int(input())
a=list(map(int,input().split(' ')))
mod = 10**9+7
ans = 1
color=[1,0,0]
g = 0
for i in a[1:]:
    cnt = 0
    for n,j in enumerate(color):
        if i==0 and j ==0:
            color[n]+=1
            cnt = 1
            break
        elif i==j:
            cnt += 1
            if cnt == 1:
                color[n]+=1
    ans *= cnt
    ans %= mod
for i in color:
    if i >0:
        g += 1
if g ==1:
    print(ans*3%mod)
else:
    print(ans*6%mod)

Submission status: Runtime Error

Solution code:
for i in range(2):
    a, b = map(int, input().split())
if b = 1:
    print(1)
else:
  	print(0)

Submission status: Runtime Error

Solution code:
import math

n = int(input())
s = input()

num = []
for i in range(n-2):
  for j in range(i + 1, n-1):
    for k in range(j + 1, n):
      tmp = s[i] + s[j] + s[k]
      if tmp not in num:
      	num.append(tmp)
print(len(num))

Submission status: Runtime Error

Solution code:
for i in range(2):
    a[i], b[i] = map(int, input().split())
if b[1] = 1:
    print(1)
else:
  	print(0)

Submission status: Runtime Error

Solution code:
for i in range(2):
    a[i], b[i] = map(int, input().split())
if b[2] = 1:
    print(1)
else:
  	print(0)

Submission status: Runtime Error

Solution code:
for _ in range(2):
    a, b = map(int, input().split())
if b[1] = 1:
    print(1)
else:
  	print(0)

Submission status: Runtime Error

Solution code:
X=int(input())
A=X//100
B=X%100

if B <= A *5:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
x = [0] * 2
y = [0] * 2
for i in range(2):
    x[i], y[i] = map(int, input().split())
if y[1] = 1:
    print(1)
else:
  	print(0)

Submission status: Runtime Error

Solution code:
grid = []
for i in range(2):
    array = list(map(int, input().strip().split()))
    grid.append(array)
if grid[3] = 1:
    print(1)
else:
  	print(0)

Submission status: Runtime Error

Solution code:
m1, d1 = map(int, input().split)
m2, d2 = map(int, input().split)

if(m1 == m2):
    print('0')
    exit()
print('1')

Submission status: Runtime Error

Solution code:
# coding:utf-8
import math
X = int(input())
c = 0
x2 = X%100
for i in range(100000):
  x = 0
  if x2/5 >= 1 :
    x = math.floor(x2/5)
    x2 -= 5*x
  elif x2 / 4 >= 1 :
    x = math.floor(x2/4)
    x2 -= 4*x
  elif x2 / 3 >= 1 :
    x = math.floor(x2/3)
    x2 -= 3*x
  elif x2 / 2 >= 1 :
    x = math.floor(x2/2)
    x2 -= 2*x
  elif x2 / 1 == 1 :
    x = math.floor(x2/1)
    x2 -= 1*x
  c += x
  if x2 == 0:
    break
if X > c*100:
  print("1")
else :
  print("0")

Submission status: Runtime Error

Solution code:
N = int(input())

a = N/1.08

a1 = round(a)

a2 = int(a1*1.08)

if a2 == N:
    print(a1)
else:
    print(":(")

Submission status: Runtime Error

Solution code:
N=1079

a = N/1.08

a1 = round(a)

a2 = int(a1*1.08)

if a2 == N:
    print(a1)
else:
    print(:()

Submission status: Runtime Error

Solution code:
# coding:utf-8
import math
X = int(input())
if X < 100:
  print("0")
  exit()
c = 0
x2 = X%100
for i in range(100000):
  x = 0
  if x2/5 > 1 :
    x = math.floor(x2/5)
    x2 -= 5*x
    five = 5*x
  elif x2 / 4 >= 1 :
    x = math.floor(x2/4)
    x2 -= 4*x
    four = 4*x
  elif x2 / 3 >= 1 :
    x = math.floor(x2/3)
    x2 -= 3*x
    three = 3*x
  elif x2 / 2 >= 1 :
    x = math.floor(x2/2)
    x2 -= 2*x
    two = 2*x
  elif x2 / 1 == 1 :
    x = math.floor(x2/1)
    x2 -= 1*x
    one = 1*x
  c += x
  if x2 == 0:
    break
if c == 0 or X >= c*100:
  print("1")
else :
  print("0")

Submission status: Runtime Error

Solution code:
x = []
y = []
for i in 2:
    x[i], y[i] = map(int, input().split())
if y[1] = 1:
	print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
N = int(input())
n = int(N/1.08)
if (N // 1.08) == ((N+1) //1.08) or int(n * 1.08) < N and N < int((n+1) * 1.08):
    print(':(')
else:
    print((N//1.08))

Submission status: Runtime Error

Solution code:
N = 2
x = [0] * 2
y = [0] * 2
for i in 2:
    x[i], y[i] = map(int, input().split())
if y[1] = 1:
	print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
import datetime

M,D = map(int,input().split())
tdy = datetime.date(2019, M, D)
tmr = now + datetime.timedelta(days=1)

if tmr.day == 1:
    print("1")
else:
    print("0")

Submission status: Runtime Error

Solution code:
N = 2
x = [0] * 2
y = [0] * 2
for i in range(N):
    x[i], y[i] = map(int, input().split())
if y[2] = 1:
	print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
import math

x = int(input())

n = x // 105
for i in range(1, 1000):
  ave = x // i
  if 100 <= ave <= 105:
    if x % 105 >= 5*n:
      print('1')
    else:
      print('0')
    exit()
print('0')

Submission status: Runtime Error

Solution code:
def isLast(m1, d1, m2, d2):
  return m2 > m1

if __name__ == "__main__":
  import sys
  m1, d1, m2, d2 = [int(_) for _ in sys.argv[1:]]
  print(isLast(m1, d1, m2, d2))

Submission status: Runtime Error

Solution code:
M1=int(input())
D1=int(input())
M2=int(input())
D2=int(input())

dt1 = date(2019,M1,D1)
dt2 = date(2019,M2,D2)

d = dt2 - dt1
d = d.days

if d != 1:
    print(0)
else:
    if M1 == 1 and D1 == 31:
        print(1)
    elif M1 == 2 and D1 == 28:
        print(1)
    elif M1 == 3 and D1 == 31:
        print(1)
    elif M1 == 4 and D1 == 30:
        print(1)
    elif M1 == 5 and D1 == 31:
        print(1)
    elif M1 == 6 and D1 == 30:
        print(1)
    elif M1 == 7 and D1 == 31:
        print(1)
    elif M1 == 8 and D1 == 31:
        print(1)
    elif M1 == 9 and D1 == 30:
        print(1)
    elif M1 == 10 and D1 == 31:
        print(1)
    elif M1 == 11 and D1 == 30:
        print(1)
    elif M1 == 12 and D1 == 31:
        print(1)
    else:
        print(0)

Submission status: Runtime Error

Solution code:
from datetime import date

M1,D1,M2,D2=map(int, input().split())

dt1 = date(2019,M1,D1)
dt2 = date(2019,M2,D2)

d = dt2 - dt1
d = d.days

if d != 1:
    print(0)
else:
    if M1 == 1 and D1 == 31:
        print(1)
    elif M1 == 2 and D1 == 28:
        print(1)
    elif M1 == 3 and D1 == 31:
        print(1)
    elif M1 == 4 and D1 == 30:
        print(1)
    elif M1 == 5 and D1 == 31:
        print(1)
    elif M1 == 6 and D1 == 30:
        print(1)
    elif M1 == 7 and D1 == 31:
        print(1)
    elif M1 == 8 and D1 == 31:
        print(1)
    elif M1 == 9 and D1 == 30:
        print(1)
    elif M1 == 10 and D1 == 31:
        print(1)
    elif M1 == 11 and D1 == 30:
        print(1)
    elif M1 == 12 and D1 == 31:
        print(1)
    else:
        print(0)

Submission status: Runtime Error

Solution code:
m, d = map(int, raw_input().split())
if m in (1,3,5,7,8,10,12) and d == 31:
  print(1)
elif m in (4,6,9,11) and d == 30:
  print(1)
elif m == 2 and d == 28:
  print(1)
else:
  print(0)

Submission status: Runtime Error

Solution code:
from datetime import date

M1=
M2=
D1=
D2=

dt1 = date(2019,M1,D1)
dt2 = date(2019,M2,D2)

d = dt2 - dt1
d = d.days

if d != 1:
    print(0)
else:
    if M1 == 1 and D1 == 31:
        print(1)
    elif M1 == 2 and D1 == 28:
        print(1)
    elif M1 == 3 and D1 == 31:
        print(1)
    elif M1 == 4 and D1 == 30:
        print(1)
    elif M1 == 5 and D1 == 31:
        print(1)
    elif M1 == 6 and D1 == 30:
        print(1)
    elif M1 == 7 and D1 == 31:
        print(1)
    elif M1 == 8 and D1 == 31:
        print(1)
    elif M1 == 9 and D1 == 30:
        print(1)
    elif M1 == 10 and D1 == 31:
        print(1)
    elif M1 == 11 and D1 == 30:
        print(1)
    elif M1 == 12 and D1 == 31:
        print(1)
    else:
        print(0)

Submission status: Runtime Error

Solution code:
X=int(input())
a=100
b=105
for n in range (0,21):
    if n*b<X<(n+1)*a:
        print("0")
        break
    else:
        n+=1
else:
    print("1")

Submission status: Runtime Error

Solution code:
import math
X = int(input())

i1 = math.floor(X/100)

for i in range(i1+1):
  for j in range(i1-i+1):
    for k in range(i1-i-j+1+1):
      for l in range(i1-i-j-k+1+1):
        for m in range(i1-i-j-k-l+1):
          for n in range(i1-i-j-k-l-m+1):
            if X==100*i + 101*j + 102*k +103*l +104*m +105*n:
              print(1)
              exit()
print(0)

Submission status: Runtime Error

Solution code:
D1=[int(i) for i in input().split(" ")]

D2=[int(i) for i in input().split(" ")]

dts={

  "28":[2],

  "30":[4,6,9,11],

  "31":[1,3,5,7,8,10,12]

}

print(int(D1[0] in dts.get(str(D1[1]),[]))

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

A,B = map(int,input().split())
C,D = map(int,input().split())

if (A == 1 or A == 3 or A == 5 or A == 7 or A == 8 A == 10 or A == 12):
  if B == 31:
    print(1)
  else:
    print(0)
elif (A == 4 or A == 6 or A== 9 or A == 11):
  if B == 30:
    print(1)
  else:
    print(0)
elif A == 2:
  if B == 28:
    print(1)
  else:
    print(0)

Submission status: Runtime Error

Solution code:

M1, D1 = int(input.split())
M2, D2 = int(input.split())

print(M1,M2)

if M1 != M2:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
from dateutil.relativedelta import relativedelta
import datetime
#import itertools#これは色々使える組み込み関数みたいなやつ
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#print(0)
N =2
month, date = [0]*N, [0]*N#N個の空のリストを作成
#l = list(range(N))#範囲がNのリストを作成する


for i in range(N):
  month[i], date[i] = map(int, input().split())

if date[1]==1:
    print(1)
else:
    print(0)
#print(datetime.date(2019, month[0], date[0]))
#today =datetime.date(2019, month[0], date[0])
#print(today+relativedelta(days=+1))
#nextday=today+relativedelta(days=+1)

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
number=[]
for i in S:
    number.append(i)

numberlist=[]
for i in range(N):
    for j in range(i+1,N):
        for k in range(j+1,N):
            candidate=number[i]+number[j]+number[k]
            if candidate not in numberlist:
                numberlist.append(candidate)

print(len(numberlist))

Submission status: Runtime Error

Solution code:
a, b, c, d = ((int(i) for i in 2) for i in 2)

if d = 1
	print(1)
else print(0)

Submission status: Runtime Error

Solution code:
m1 = input()
d1 = input()
m2 = input()
d2 = input()

if m1 == m2:
    print(0)
else:
    print(1)

Submission status: Runtime Error

Solution code:
def main():
  M = []
  D = []
  for i in range(2):
    m, d = [int(i) for i in input().split()]
    M.append(m)
    D.append(d)

  if (M[0] != M[1]):
    print(1)
  else:
	print(0)

if __name__ == "__main__":
  main()

Submission status: Runtime Error

Solution code:
import math
import numpy as np
import re
import sys


def inputs():
    return [int(s) for s in input().split()]


def main():
    M1, _ = inputs()
    M2, _ = inputs()

    if (M1 + 1) % 12 == M2 % 12:
        return 1
    else:
        return 0


if __name__ == '__main__':
    print(main())

Submission status: Runtime Error

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
m1 == m2 if ans = 0 else ans = 1
print(ans)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#include <boost/multiprecision/cpp_int.hpp>
//typedef boost::multiprecision::cpp_int ll;
typedef long double dd;
#define i_7 (ll)(1E9+7)
//#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
typedef pair<ll,ll> l_l;
ll inf=(ll)1E17;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
void Max(ll &pos,ll val){pos=max(pos,val);}//Max(dp[n],dp[n-1]);
void Min(ll &pos,ll val){pos=min(pos,val);}
void Add(ll &pos,ll val){pos=mod(pos+val);}
dd EPS=1E-9;
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
////////////////////////////

int main(){fastio
    ll a,c,b;cin>>a>>c>>b>>c;
    if(a==b){
        cout<<0;
    }else{
        cout<<1;
    }
    
    return 0;
}

Submission status: Runtime Error

Solution code:
m1 = int(input())
d1 = int(input())
m2 = int(input())
d2 = int(input())

if m1 == m2:
    print(0)
else:
    print(1)

Submission status: Runtime Error

Solution code:
n = int(input())
for i in range(1, 100001):
	if i*(615) == n:
		c = i
		break
try:
	if c > 0:
		print(1)
except:
	print(0)

Submission status: Runtime Error

Solution code:
M1 = int(input())
D1 = int(input())
M2 = int(input())
D2 = int(input())

if D2 == 1:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
import math
N=int(input())
Min=N/1.08
Max=(N+1)/1.08
Mi=int(math.ceil(Min))
Ma=int(math.floor(Max))
if Ma<Mi:
  print(":(")
else:
  print(Mi)

Submission status: Runtime Error

Solution code:
x = int(input())
flag = False
for i in range(x//105,x//105+2):
    ans = x - i * 100
    if ans <= 5 * i:
        flag = True
if flag:
  print("1")
else:
  print("0")

Submission status: Runtime Error

Solution code:
TAX = 1.08
value = int(input())

row_cost = int(value / TAX)

flag = False
echo_cost = 0
if int(row_cost * TAX) == value:
    flag = True
    echo_cost = int(row_cost )
elif int((row_cost + 1) * TAX) == value:
    flag = True
    echo_cost = int(row_cost + 1)

else :
    flag = False

if flag:
    print(echo_cost)
else:
    print(":(")

Submission status: Runtime Error

Solution code:
N = float(input())
x = N/1.08
x = int(x)
print(x)

Submission status: Runtime Error

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if (mi != m2):
    print("1")
else:
    print("0")

Submission status: Runtime Error

Solution code:
ip=input().strip()
while((len)==0):
  ip=input().strip()
m,d=map(int,ip.split())
m1,d1=map(int,input().split())
odd=[1,3,5,7,8,10,12]
eve=[4,6,9,11]
if m in odd:
  if(d==31):
    print(1)
  else:
    print(0)
elif m in even:
  if(d==30):
    print(1)
  else:
    print(0)
else:
  if(d==28):
    print(1)
  else:
    print(0)

Submission status: Runtime Error

Solution code:
M1, D1 = map(int,input().split())
M2, D2 = map(int,input().split())
if M1 != M2:
  return 0
else:
  return 1

Submission status: Runtime Error

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1, d1 = 1,31:
  print('1')
elif m1, d1 = 2, 28:
  print('1')
elif m1, d1 = 3, 31:
  print('1')
elif m1, d1 = 4, 30:
  print('1')
elif m1, d1 = 5, 31:
  print('1')
elif m1, d1 = 6, 30:
  print('1')
elif m1, d1 = 7, 31:
  print('1')
elif m1, d1 = 8, 31:
  print('1')
elif m1, d1 = 9, 30:
  print('1')
elif m1, d1 = 10, 31:
  print('1')
elif m1, d1 = 11, 30:
  print('1')
else:
  print('0')

Submission status: Runtime Error

Solution code:
M1, M2, D1, D2 = map(int, input().split())

if M2 - M1 == 0:
    print(0)
else:
    print(1)

Submission status: Runtime Error

Solution code:
M1, D1, M2, D2 = (int(i) for i in input().split()) 
if D2 = 1
	print(1)
else print(0)

Submission status: Runtime Error

Solution code:
m1,d1 =map(int,input().split())
m2,d2 =map(int,input().split())
if m1 == m2 :
    return 0 :
else :
    return 1:

Submission status: Runtime Error

Solution code:
m1, d1 = input().split()
m1, d2 = input().split()
d2 = int(d2)
result = 0

if d2 == 1
  result = 1
print(result)

Submission status: Runtime Error

Solution code:
a = eval()

Submission status: Runtime Error

Solution code:
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
if D2=D1 + 1:
  return 0
else:
  return 1

Submission status: Runtime Error

Solution code:
m1, d1 = int(input())
m2, d2 = int(input())
if m1==m2:
  print("0")
else:
  print("1")

Submission status: Runtime Error

Solution code:
import sys
m,d = int(input().split())
if m in ('1','3','5','7','8','10','12'):
  if d == '31':
    print('1')
elif m == '2':
  if d == '28':
    print('1')
else:
  print('0')

Submission status: Runtime Error

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 != m2:
    print("1")
    exit(1)

print("0")

Submission status: Runtime Error

Solution code:
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())

if D2=1:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:

if D2 == 1:
  print("1")

else:
  print("0")

Submission status: Runtime Error

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 != m2:
    print("1")
    exit(1)

print(0)

Submission status: Runtime Error

Solution code:
M_1, D_1 = map(int,input().split())
M_2, D_2 = map(int,input().split())

if = M_1 =! M_2:
  print('1')
else:
  print('0')

Submission status: Runtime Error

Solution code:
#code
a,b=map(int,input().split())
c,d=map(int,input().spit())
if a==c:
    print(0)
else:
    print(1)

Submission status: Runtime Error

Solution code:
day1 = map(int, input().split())
day2 = map(int, input().split())

if day2[1] == 1:
    print("1")
else:
    print("0")

Submission status: Runtime Error

Solution code:
# 2019 12/01
# A November 30

M1, D1 = map(int, input())
M2, D2 = map(int, input())

if int(D2) == 1:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
d1 = list(map(int ,input().split())
d2 = list(map(int ,input().split())
if d2[0] != d1[0]:
          print(1)
else:
          print(0)

Submission status: Runtime Error

Solution code:
m,d=map(int,input().split())
a,b=map(int,input().split())
if a=m+1:
    print("1")
else:
    print("0")

Submission status: Runtime Error

Solution code:
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
if M1+1==M2 and D2 == 1:
    state = 1
else:
    state == 0
print(state)

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<cstdio>
#define ll long long
using namespace std;

int main(){
  int M1,D1;cin>>M1>>D1;
  int M2,D2;cin>>M2>>D2;
  if(M1!=M2)cout<<1;
  else cout<<0;
}

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <stack>
#include <queue>
#include <numeric>
#include <map>
#include <unordered_map>
#include <set>
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
#define mod 1000000007
using ll = long long;
using namespace std;

int main(){
  int M1, D1, M2, D2; cin >> M1 >> D1 >> M2 >> D2;
  if(D2==1) cout << 1 << endl;
  else cout << 0 << endl;
  return 0;
}