Problem:


Score : 100 points

Problem Statement

You are given two integers a and b.
Determine if a+b=15 or a\times b=15 or neither holds.

Note that a+b=15 and a\times b=15 do not hold at the same time.

Constraints

1 \leq a,b \leq 15

All values in input are integers.

Input

Input is given from Standard Input in the following format:

a b

Output

If a+b=15, print +;
if a\times b=15, print *;
if neither holds, print x.

Sample Input 1

4 11

Sample Output 1

+

4+11=15.

Sample Input 2

3 5

Sample Output 2

*

3\times 5=15.

Sample Input 3

1 1

Sample Output 3

x

1+1=2 and 1\times 1=1, neither of which is 15.



Sample input:
4 11


Sample output:
+

Submission status: Runtime Error

Solution code:
# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a,b):
    if a*b==15:
        return "*"
    if a+b==15:
        return "+"
    else:
        return "x"
        
# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a,b):
    if a*b==15:
        return '*'
    if a+b==15:
        return '+'
    else:
        return 'x'
        
# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a,b):
    if a*b==15:
        return "*"
    if a+b==15:
        return "+"
    else:
        return "x"
        
# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a,b):
    if a*b==15:
        return "*"
    if a+b==15:
        return "+"
    else:
        return "×"
        
# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
if a+b==15:
  print("+")
else if a*b==15:
  print("*")
else:
  print("x")

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split(" "))
if a+b==15:
  print("+")
else if a*b==15:
  print("*")
else:
  print("x")

Submission status: Runtime Error

Solution code:
a,b = int(input().split(" "))
if a+b==15:
  print("+")
else if a*b==15:
  print("*")
else:
  print("x")

Submission status: Runtime Error

Solution code:
n,m,d = (float)(input().split())
print(2*(m-1)*(n-d)/(n*n))

Submission status: Runtime Error

Solution code:
a,b = int(input().split())
if a+b==15:
  print('+')
elif a*b == 15:
  print('*')
else:
  print('x')

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

if a*b==15:
    print("*")
elif a+b==15:
    print("+")
else:
    print("x")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

if a*b==15: print("*")
elif a+b==15: print("+")
else :print("x")

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
if a+b==15:
    print("+")
elif a*b==15:
    print("*")
else:
    print("x")

Submission status: Runtime Error

Solution code:
n, m, d = map(int, input().split())
if d != 0:
    print((2 * (n - d) * (m - 1)) / (n ** 2))
else:
    print((m - 1) / n)

Submission status: Runtime Error

Solution code:
a,b = [int(i) i for i in input().split()]
if a*b == 15:
  print('*')
elif a+b == 15:
  print('+')
else:
  print('x')

Submission status: Runtime Error

Solution code:
a,b = [int(i) i for i in input().split()]
if a*b == 15:
	print('*')
elif a+b == 15:
	print('+')
else:
  	print('x')

Submission status: Runtime Error

Solution code:
print('+' if int(input()) + int(input()) == 15 else 'X')

Submission status: Runtime Error

Solution code:
def solution():

    n, m, d = map(int, input().split())


    if d == 0:
        guess = n
        return (m-1)/n

    else:

        guess = 2 * (n - d)
        return (guess*(m-1)/n**2)

print(solution())

Submission status: Runtime Error

Solution code:
import heapq
from collections import defaultdict

N,m,s,t=map(int,input().split())

V=defaultdict(set)
V2=defaultdict(set)
for i in range(m):
  a,b,c,d=map(int,input().split())
  V[a-1].add((b-1,c))
  V[b-1].add((a-1,c))
  V2[a-1].add((b-1,d))
  V2[b-1].add((a-1,d))

def dijkstra(n,v,dedic):
  d=[float('inf')]*n
  d[v]=0
  
  hq=[(0,v)]
  
  while hq:
    u = heapq.heappop(hq)[1]
    for nv,c in dedic[u]:
      if d[nv]>d[u]+c:
        d[nv]=d[u]+c
        heapq.heappush(hq,(d[u]+c,nv))
        
  return d

ans=dijkstra(N,s-1,V)
ans2=dijkstra(N,t-1,V2)

ans3=[(ans[x]+ans2[x]) for x in range(N)]

for i in range(N):
  print(10**15-min(ans3[i:]))

Submission status: Runtime Error

Solution code:
n,m,d=(int(i) for i in input().split(" "))
if d==0:

    print(((n-d)*(n**(m-2))*(m-1))/(n**m))
else:
    print((2*(n-d)*(n**(m-2))*(m-1))/(n**m))

Submission status: Runtime Error

Solution code:
print('１以上の整数と15以下の整数を入力してください')
a, b = map(int,  input(). split())
wa = a + b
sek = a * b
if wa == 15;
 print('+')
elif sek == 15;
 print('*')
else;
 print('x')

Submission status: Runtime Error

Solution code:
import itertools

l = input().split(' ')

n = int(l[0])
m = int(l[1])
d = int(l[2])

def get_beauty(l,d):
    # top = abs(l[0]-l[1])
    other = list(map(lambda x,y:abs(x-y),l[:-1],l[1:]))
    return other.count(d)

aa = [i+1 for i in range(n)]
candi = list(itertools.combinations_with_replacement(aa,r=m))
beauty = list(map(get_beauty,candi,[d for i in range(len(candi))]))
print(sum(beauty)/len(candi))

Submission status: Runtime Error

Solution code:
print('１以上の整数と15以下の整数を入力してください')
a, b = map(int,  input(). split())
if a+b == 15;
 print('+')
elif a*b == 15;
 print('*')
else;
 print('x')

Submission status: Runtime Error

Solution code:
import numpy as np
import itertools
n,m,d = map(int, input().split())

n = [x for x in range(1, n+1)]
x = np.array(list(itertools.product(n, repeat=m)))
print(np.sum((x[:,1:] - x[:,:-1]) == d) / x.shape[0])

Submission status: Runtime Error

Solution code:
import itertools

l = list(map(int, input().split(' ')))

n = l[0]
m = l[1]
d = l[2]

Submission status: Runtime Error

Solution code:
import itertools

l = list(map(int, input().split(' ')))

n = l[0]
m = l[1]
d = l[2]
print(a)

Submission status: Runtime Error

Solution code:
import itertools

l = list(map(int, input().split(' ')))

n = l[0]
m = l[1]
d = l[2]

def get_beauty(l,d):
    # top = abs(l[0]-l[1])
    other = list(map(lambda x,y:abs(x-y),l[:-1],l[1:]))
    return other.count(d)

aa = [i+1 for i in range(n)]
candi = list(itertools.product(aa,repeat=m))
beauty = list(map(get_beauty,candi,[d for i in range(len(candi))]))
print(sum(beauty)/len(candi))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

if a + b == 15:
    print('+')
elif a * b == 15:
    print('*')
else:
    print('x')

Submission status: Runtime Error

Solution code:
import itertools

l = list(map(int, input().split()))

n = l[0]
m = l[1]
d = l[2]

def get_beauty(l,d):
    # top = abs(l[0]-l[1])
    other = list(map(lambda x,y:abs(x-y),l[:-1],l[1:]))
    return other.count(d)

aa = [i+1 for i in range(n)]
candi = list(itertools.product(aa,repeat=m))
print(candi)
beauty = list(map(get_beauty,candi,[d for i in range(len(candi))]))
print(sum(beauty)/len(candi))

Submission status: Runtime Error

Solution code:
import numpy as np
import itertools
n,m,d = map(int, input().split())

n = np.arange(1, n+1)
x = np.array(list(itertools.product(n, repeat=m)))
print(np.sum((x[:,1:] - x[:,:-1]) == d) / x.shape[0])

Submission status: Runtime Error

Solution code:
[a,b]=[int(i) for i in input().split()]
if a*b=15:
    print("*")
elif a+b=15:
    print("+")
else:
    print("x")

Submission status: Runtime Error

Solution code:
string = input()
# print(string)
# string = string[0]
# num = int(string[1])

num = int(input())
# num = int(l[1])
# print(string)
if num == 0:
    out = string
    print(out)
else:
    out=string[0]
    for i in [i for i in range(len(string))]:
        if i != 0:
            if i%num == 0:
                out=out+string[i]
    print(out)

Submission status: Runtime Error

Solution code:
string = input()
# print(string)
# string = string[0]
# num = int(string[1])

num = int(input())
# num = int(l[1])
# print(string)
if num == 0:
    print(string)
else:
    out=string[0]
    for i in [i for i in range(len(string))]:
        if i != 0:
            if i%num == 0:
                out=out+string[i]
    print(out)

Submission status: Runtime Error

Solution code:
a = input()
b = a.split()

if(b[0] + b[1] == 15):
    print('+')
elif(b[0] * b[1] == 15):
    print('*')
else:
    print('x')

Submission status: Runtime Error

Solution code:
a, b = map(int, input())
if a + b == 15:
    print("+")
elif a * b == 15:
    print("*")
else:
    print("x")

Submission status: Runtime Error

Solution code:
l = input()
string = l
num = input()
print(string)

Submission status: Runtime Error

Solution code:
l = raw_input().split(' ')
string = l[0]
print(string)

Submission status: Runtime Error

Solution code:
l = raw_input().split(' ')
string = l[0]
# string = string[0]
# num = int(string[1])
# num = input()
# num = int(num)
num = int(l[1])
# print(string)
if num == 0:
    print(string)
else:
    out=string[0]
    for i in [i for i in range(len(string))]:
        if i != 0:
            if i%num == 0:
                out=out+string[i]
    print(out)

Submission status: Runtime Error

Solution code:

l = raw_input().split()
string = l[0]
# string = string[0]
# num = int(string[1])
# num = input()
# num = int(num)
num = int(l[1])
# print(string)
if num == 0:
    print(string)
else:
    out=string[0]
    for i in [i for i in range(len(string))]:
        if i != 0:
            if i%num == 0:
                out=out+string[i]
    print(out)

Submission status: Runtime Error

Solution code:
string = input()

# string = string[0]
# num = int(string[1])
num = input()
num = int(num)
print(string)
# if num == 0:
#     print(string)
# else:
#     out=string[0]
#     for i in [i for i in range(len(string))]:
#         if i != 0:
#             if i%num == 0:
#                 out=out+string[i]
#     print(out)

Submission status: Runtime Error

Solution code:
def sum_ans(data):
    if sum(data) == 15:
        print("+")


def main():
    inputs = input()
    data = inputs.split(" ")
    m = max(data)
    ans = 15
    if m > 15:
        print("x")
    else:
        sum_ans()
        if data[0] * data[1] == 15:
            print("*")
        elif data[0] * data[1] < 15:
            print("x")
        
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
def sum_ans(data):
    if sum(data) == 15:
        print("+")


def main():
    inputs = input()
    data = inputs.split(" ")
    m = max(data
    ans = 15
    if m > 15:
        print("x")
    else:
        sum_ans()
        if data[0] * data[1] == 15:
            print("*")
        elif data[0] * data[1] < 15:
            print("x")
        
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
string = input()
num = int(input())
if num == 0:
    print(string)
else:
    out=string[0]
    for i in [i for i in range(len(string))]:
        if i != 0:
            if i == 0:
                out=out+string[i]
    print(out)

Submission status: Runtime Error

Solution code:
string = input()
num = int(input())
if num == 0:
    print(string)
else:
    out=string[0]
    for i in [i for i in range(len(string))]:
        if i != 0:
            if i%num == 0:
                out=out+string[i]
    print(out)

Submission status: Runtime Error

Solution code:
string = input()
num = int(input())
if num == 0:
    print(string)
else:
    out=string[0]
    for i,s in zip([i for i in range(len(string))],string):
        if i != 0:
            if i%num == 0:
                out=out+string[i]
    print(out)

Submission status: Runtime Error

Solution code:
string = input()
num = int(input())
if num == 0:
    print(string)
else:
    count=1
    out=string[0]

    for i,s in zip([i for i in range(len(string))],string):
        if i != 0:
            if i%num == 0:
                out=out+string[i]
    print(out)

Submission status: Runtime Error

Solution code:
# coding; utf-8
cdef int a = input()
cdef int b = input()
if a + b == 15:  print("+")
elif a * b == 15:  print("*")
else:  print(x)

Submission status: Runtime Error

Solution code:
string = input()
num = int(input())

count=1
out=string[0]

for i,s in zip([i for i in range(len(string))],string):
    if i != 0:
        if i%num == 0:
            out=out+string[i]

print(out)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split(' '))
if a + b == 15:
    print('+')
elif a ＊ b == 15:
    print('＊')
else:
    print('x')

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split(' ')
if a + b == 15:
    print('+')
elif a ＊ b == 15:
    print('＊')
else:
    print('x')

Submission status: Runtime Error

Solution code:
def sum_ans = (data):
    if sum(data) == 15:
        print("+")


def main():
    inputs = input()
    data = inputs.split(" ")
    m = max(data
    ans = 15
    if m > 15:
        print("x")
    else:
        sum_ans()
        if data[0] * data[1] == 15:
            print("*")
        elif data[0] * data[1] < 15:
            print("x")
        
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
a,b =map(int,input().split(' ')
if a + b == 15:
    print('+')
elif a ＊ b == 15:
    print('＊')
else:
    print('x')

Submission status: Runtime Error

Solution code:
string = input()
num = int(input())

count=1
out =string[0]

for i,s in zip([i for i in range(len(string))],string):
    if i != 0:
        if i%num == 0:
            out=out+string[i]
print(out)

Submission status: Runtime Error

Solution code:
a,b =map(int,input().split(' ')
if a + b == 15:
    print('+')
elsif a ＊ b == 15:
    print('＊')
else:
    print('x')

Submission status: Runtime Error

Solution code:
string = input()
num = int(input())

count=1
out =string[0]
# for s in string:
#     if count==num:
#         out=out+string[len(out)*num]
#         count=1
#     else:
#         count=count+1
# print(out)

for i,s in zip([i for i in range(len(string))],string):
    if i != 0:
        if i%num == 0:
            out=out+string[i]
print(out)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
if a + b == 15:  print("+")
elif a * b == 15:  print("*")
else:  print(x)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())

if a+b=15:
    print('+')

elif:
    a*b=15
    print('*')

else:
    print('×')

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

if a + b == 15:
  print("+")
elif a * b == 15:
  print("*")
else:
  print(x)

Submission status: Runtime Error

Solution code:
string = input()
num = int(input())

count=1
out =''
for s in string:
    if count==num:
        out=out+string[len(out)*num]
        count=1
    count=count+1
print(out)

Submission status: Runtime Error

Solution code:
a,b=[int(x) for x in input()]
if a+b==15:
    print("+")
elif a*b==15:
    print("*")
else:
    print("x")

Submission status: Runtime Error

Solution code:
string = input()
num = int(input())

count=1
out =''
for s in string:
    if count==num:
        out=out+s
        count=1
    count+1

Submission status: Runtime Error

Solution code:
string = input()
num = int(input())

count=1
out =''
for s in string:
    if count=num:
        out=out+s
        count=1
    count+1

Submission status: Runtime Error

Solution code:
a, b = input().split()

if a + b == 15:
    print("+")
elif a * b == 15:
    print("*")
else:
    print("x")

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())

if a + b = 15 :
    print("+")
elif a*b = 15 :
    print("*")
else :
    print("×")

Submission status: Runtime Error

Solution code:
l = raw_input().split()
if int(l[0])+int(l[1])==15:
    print('+')
elif int(l[0])*int(l[1]) ==15:
    print('*')
else:
    print('x')

Submission status: Runtime Error

Solution code:
l = raw_input().split()
if l[0]+l[1]==15:
    print('+')
elif l[0]*l[1] ==15:
    print('*')
else:
    print('x')

Submission status: Runtime Error

Solution code:
S = raw_input()
w = int(raw_input())
print "".join(S[i] for i in xrange(0, len(S), w))

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <queue>
#include <map>
#include <string.h>
#include <math.h>
#include <stdio.h>
#include <deque>
#include <bits/stdc++.h>
//#include "D:\C++\test_lib_projects\testlib.h"
using namespace std;
#define ll long long
#define pii pair<int,int>

bool debug=true;
/*
   Write In New Computer
    By XiaoGeNintendo
	     gwq2017
	Type:
*/
template<typename T1,typename T2>ostream& operator<<(ostream& os,pair<T1,T2> ptt){
	os<<ptt.first<<","<<ptt.second;
	return os;
}
template<typename T>ostream& operator<<(ostream& os,vector<T> vt){
	os<<"{";
	for(int i=0;i<vt.size();i++){
		os<<vt[i]<<" ";
	}
	os<<"}";
	return os;
}

int a,b;
int main(int argc,char* argv[]){
	cin>>a>>b;
	if(a+b==15){
		cout<<"+";
		return 0;
	}
	if(a*b==15){
		cout<<"*";
		return 0;
	}
	cout<<"x";
	return 0;
}

Submission status: Runtime Error

Solution code:
from bisect import bisect_left as bl
from bisect import bisect_right as br
from itertools import combinations as cmb
from itertools import combinations_with_replacement as cmbwr
from itertools import permutations as prm
from itertools import accumulate as acm
from math import gcd
from math import ceil
from math import factorial as fact
from collections import deque
from collections import Counter
from heapq import heappop as hpp
from heapq import heappush as hps
import sys
sys.setrecursionlimit(10 ** 6)
INF = 10 ** 20
direct = ((1, 0), (0, 1), (-1, 0), (0, -1))
def ilinp(): return list(map(int, input().split()))
def slinp(): return input().split()
def iinp(): return int(input())

a, b = ilinp()
if a + b == 15:
  print("+")
elif a* b == 15:
  print("*")
else:
  print("x")

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
if a* b == 15:
    print("*")
elif a+ b == 15:
    print("+")
else:
    print(x)