input stringlengths 1 8.57k | output stringlengths 2 5.65k |
|---|---|
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked, "Oh, I sent it with a pocket bell because I was in a hu... | "Correct Solution:
```
def get_input():
while True:
try:
yield ''.join(input())
except EOFError:
break
table = \
["afkpuz",\
"bglqv.",\
"chmrw?",\
"dinsx!",\
"ejoty "]
N = list(get_input())
for l in range(len(N)):
str = N[l]
ans = ""
if len(str) % 2 == 1:
... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked, "Oh, I sent it with a pocket bell because I was in a hu... | "Correct Solution:
```
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0127
"""
import sys
input = sys.stdin.readline
def decode(code):
result = ''
while code:
try:
c = code[:2]
result += Code_table[c]
code = code[2:]
exc... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked, "Oh, I sent it with a pocket bell because I was in a hu... | "Correct Solution:
```
mes = {11:"a",12:"b",13:"c",14:"d",15:"e"
,21:"f",22:"g",23:"h",24:"i",25:"j"
,31:"k",32:"l",33:"m",34:"n",35:"o"
,41:"p",42:"q",43:"r",44:"s",45:"t"
,51:"u",52:"v",53:"w",54:"x",55:"y"
,61:"z",62:".",63:"?",64:"!",65:" "}
while True:
try:
s = input()
except:
... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked, "Oh, I sent it with a pocket bell because I was in a hu... | "Correct Solution:
```
L = []
L.append(list("abcde"))
L.append(list("fghij"))
L.append(list("klmno"))
L.append(list("pqrst"))
L.append(list("uvwxy"))
L.append(list("z.?! "))
while True:
try:
tmp = input()
l = [int(x)-1 for x in list(tmp)]
except:
break
if len(l) % 2 > 0:
pr... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked, "Oh, I sent it with a pocket bell because I was in a hu... | "Correct Solution:
```
dic = {}
base = ord("a")
for x in range(5):
for y in range(5):
dic[(x + 1, y + 1)] = chr(base + x * 5 + y)
dic[(6, 1)] = "z"
dic[(6, 2)] = "."
dic[(6, 3)] = "?"
dic[(6, 4)] = "!"
dic[(6, 5)] = " "
def to_mess(nums):
if len(nums) % 2 == 1:
return "NA"
mess = ""
for i in range(0... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked, "Oh, I sent it with a pocket bell because I was in a hu... | "Correct Solution:
```
import sys
convert = {"1": {"1": "a", "2": "b", "3": "c", "4": "d", "5": "e"},
"2": {"1": "f", "2": "g", "3": "h", "4": "i", "5": "j"},
"3": {"1": "k", "2": "l", "3": "m", "4": "n", "5": "o"},
"4": {"1": "p", "2": "q", "3": "r", "4": "s", "5": "t"},
"5... |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked,... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked,... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked,... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked,... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked,... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked,... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked,... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One day, Taro received a strange email with only the number "519345213244" in the text. The email was from my cousin, who was 10 years older than me, so when I called and asked,... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n words, each of which consists of lowercase alphabet letters. Each word contains at least one vowel. You are going to choose some of the given words and make as m... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n words, each of which consists of lowercase alphabet letters. Each word contains at least one vowel. You are going to choose some of the given words and make as m... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n words, each of which consists of lowercase alphabet letters. Each word contains at least one vowel. You are going to choose some of the given words and make as m... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n words, each of which consists of lowercase alphabet letters. Each word contains at least one vowel. You are going to choose some of the given words and make as m... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n words, each of which consists of lowercase alphabet letters. Each word contains at least one vowel. You are going to choose some of the given words and make as m... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n words, each of which consists of lowercase alphabet letters. Each word contains at least one vowel. You are going to choose some of the given words and make as m... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n words, each of which consists of lowercase alphabet letters. Each word contains at least one vowel. You are going to choose some of the given words and make as m... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n words, each of which consists of lowercase alphabet letters. Each word contains at least one vowel. You are going to choose some of the given words and make as m... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Developers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for your search.... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Developers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for your search.... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Developers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for your search.... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Developers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for your search.... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Developers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for your search.... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Developers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for your search.... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Developers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for your search.... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Developers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for your search.... | No |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English l... | "Correct Solution:
```
A = input().split(" ")
print(A[1] + A[0])
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English l... | "Correct Solution:
```
s,t=[x for x in input().split()]
print(t+s)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English l... | "Correct Solution:
```
s, t = list(input().split())
print(t + s)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English l... | "Correct Solution:
```
str=input().split(" ")
print(str[1]+str[0])
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English l... | "Correct Solution:
```
S=input().split()
print("".join(S[::-1]))
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English l... | "Correct Solution:
```
S,T = input().split()
str=T+S
print(str)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English l... | "Correct Solution:
```
s=input().split()
a=s[1]+s[0]
print(a)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English l... | "Correct Solution:
```
S, T = input().split()
print(T + S)
``` |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
... | No |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.... | "Correct Solution:
```
# A
s = input()
print("A"+ s[8]+ "C")
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.... | "Correct Solution:
```
X=input()
print(X[0]+X[8]+X[-7])
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.... | "Correct Solution:
```
print("A%sC"%input()[8])
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.... | "Correct Solution:
```
s = input()
print("A" + str(s[8]) + "C")
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.... | "Correct Solution:
```
s = input()[8]
print("A{0}C".format(s))
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.... | "Correct Solution:
```
S = input().split()
print('A'+S[1][0]+'C')
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.... | "Correct Solution:
```
S = list(str(input()))
print('A'+ S[8] +'C')
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.... | "Correct Solution:
```
print("A%cC"%input()[8])
``` |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second ... | No |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no regularity in the order of the characters that appear i... | "Correct Solution:
```
import sys
s=sys.stdin
while 1:
n=int(s.readline())
if n==0:break
d={}
for _ in[0]*n:
k,v=s.readline().strip().split()
d[k]=v
a=''
for _ in[0]*int(s.readline()):
e=s.readline().strip()
a+=d[e]if e in d else e
print(a)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no regularity in the order of the characters that appear i... | "Correct Solution:
```
n=int(input())
while(n!=0):
list={}
sum=""
for i in range(n):
a,b=input().split()
list[a]=b.rstrip()
n=int(input())
for i in range(n):
s=input().rstrip()
if s in list:
sum+=list[s]
else:
sum+=s
print(sum)
... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no regularity in the order of the characters that appear i... | "Correct Solution:
```
while True:
x = int(input())
if x == 0:
break
dcl = {}
for i in range(x):
inp = list(map(str, input().split()))
dcl[inp[0]] = inp[1]
ans = ""
x = int(input())
for i in range(x):
y = str(input()[0])
if y in dcl:
ans +=... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no regularity in the order of the characters that appear i... | "Correct Solution:
```
import sys
while True:
n = int(sys.stdin.readline().rstrip())
if n == 0:
break;
x = {}
for i in range(n):
k,v = sys.stdin.readline().rstrip().split()
x[k] = v
y = []
for i in range(int(sys.stdin.readline().rstrip())):
a = sys.stdin.readline... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no regularity in the order of the characters that appear i... | "Correct Solution:
```
import sys
s=sys.stdin
f=lambda:s.readline()
while 1:
n=int(f())
if n==0:break
d={}
for _ in[0]*n:
k,v=f().strip().split()
d[k]=v
a=''
for _ in[0]*int(f()):
e=f().strip()
a+=d[e]if e in d else e
print(a)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no regularity in the order of the characters that appear i... | "Correct Solution:
```
if __name__ == '__main__':
# ??????????????\???
while True:
conv_num = int(input().strip())
if conv_num == 0:
break
conv_dict = {}
for i in range(conv_num):
from_ch, to_ch = input().strip().split(' ')
conv_dict[from_ch] ... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no regularity in the order of the characters that appear i... | "Correct Solution:
```
import math
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect
while(True):
after_string_list = []
before_string_list = []
convert_list = {}
n = int(input())
if n == 0:
break
for i in range(n):
... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no regularity in the order of the characters that appear i... | "Correct Solution:
```
#!/home/minamo/.pyenv/versions/3.6.1/bin/python
# vim: ft=python
# coding: utf-8
def registerDictionaryFromTheNumberOf(counts):
dictionary = {}
for i in range(counts):
key, value = input().split(" ")
dictionary[key] = value
return dictionary
def readCharacterBeforeCo... |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Create a program that converts data based on the given conversion table.
The characters used in the data are letters or numbers, and the letters are case sensitive. There is no... | No |
### Instruction: Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. This problem is different with hard version only by constraints on total answers length It is an interactive problem Venya joined a tour to the madhouse, in which orderlies play ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This problem is different with hard version only by constraints on total answers length
It is an interactive problem
Venya joined a tour to the madhouse, in which orderlies pl... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This problem is different with hard version only by constraints on total answers length
It is an interactive problem
Venya joined a tour to the madhouse, in which orderlies pl... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This problem is different with hard version only by constraints on total answers length
It is an interactive problem
Venya joined a tour to the madhouse, in which orderlies pl... | No |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
You have obtained the Izua Japanese dictionary, which is the official language of Izua, and the Izua alphabet (list of letters). There are N types of letters in the Izua alphabet. The order of the words that appear in the Izua Japane... | "Correct Solution:
```
import sys
readline = sys.stdin.readline
write = sys.stdout.write
def main():
MOD = 10**9 + 7
def query(k0):
s = 0
k = k0
while k:
s += data[k]
k -= k & -k
k = k0
while k <= N:
data[k] += 1
k += k & -... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
You have obtained the Izua Japanese dictionary, which is the official language of Izua, and the Izua alphabet (list of letters). There are N types of letters in the Izua alphabet. The order of the words that appear in the Izua Japane... | "Correct Solution:
```
def solve():
from sys import stdin
m = 1000000007
f_i = stdin
while True:
N = int(f_i.readline())
if N == 0:
break
w = list(range(N))
R = int(f_i.readline())
for i in range(R):
s, t = map(int, f_i.readli... |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You have obtained the Izua Japanese dictionary, which is the official language of Izua, and the Izua alphabet (list of letters). There are N types of letters in the Izua alphabe... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You have obtained the Izua Japanese dictionary, which is the official language of Izua, and the Izua alphabet (list of letters). There are N types of letters in the Izua alphabe... | No |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Airport Codes
Airport code
In the Kingdom of JAG, airport codes are assigned to each domestic airport for identification.
Airport codes are assigned according to the following rules based on the name of the airport in lowercase En... | "Correct Solution:
```
boin = set(['a', 'i', 'u', 'e', 'o'])
def convert(name):
s = name[0]
for i, c in enumerate(name[1:], 1):
if name[i - 1] in boin:
s += name[i]
return s
while True:
n = int(input())
if n == 0:
break
names = [input() for _ in range(n)]
conv =... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Airport Codes
Airport code
In the Kingdom of JAG, airport codes are assigned to each domestic airport for identification.
Airport codes are assigned according to the following rules based on the name of the airport in lowercase En... | "Correct Solution:
```
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
def enc(s):
repatter = re.compile(r"[aiueo]")
ans = s[0]
for i in range(len(s)):
if i < len(s)-1 and repatter.match(s[i]):
ans += s[i+1]
return ans
def max_str(s):
ans = len(s[0])
for i in s:
... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Airport Codes
Airport code
In the Kingdom of JAG, airport codes are assigned to each domestic airport for identification.
Airport codes are assigned according to the following rules based on the name of the airport in lowercase En... | "Correct Solution:
```
# coding: utf-8
import sys
def coding(s):
t = ''
flag = True
for i in s:
if flag:
t += i
flag = False
if i == 'a' or i == 'i' or i == 'u' or i == 'e' or i == 'o':
flag = True;
return t
def pre_possible(ls):
flag = False
... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Airport Codes
Airport code
In the Kingdom of JAG, airport codes are assigned to each domestic airport for identification.
Airport codes are assigned according to the following rules based on the name of the airport in lowercase En... | "Correct Solution:
```
V = {"a", "i", "u", "e", "o"}
while True:
N = int(input())
if N==0:
exit()
L = []
maxs = 0
for _ in range(N):
s = input()
s_ = s[0]
for i in range(len(s)-1):
if s[i] in V:
s_ += s[i+1]
maxs = max(maxs, len(s_)... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Airport Codes
Airport code
In the Kingdom of JAG, airport codes are assigned to each domestic airport for identification.
Airport codes are assigned according to the following rules based on the name of the airport in lowercase En... | "Correct Solution:
```
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.rea... |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Airport Codes
Airport code
In the Kingdom of JAG, airport codes are assigned to each domestic airport for identification.
Airport codes are assigned according to the following rules based on the name of the airport in lowercase En... | "Correct Solution:
```
while True:
n = int(input())
if n==0:
break
s = []
maxlen = 0
for i in range(n):
st = input()
stt = ""
for j in range(len(st)):
if j==0 or st[j-1] in "aiueo":
stt += st[j]
s.append(stt)
maxlen = max(maxlen, len(stt))
ans = -1
k = 1
while k<=m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.