input stringlengths 1 8.57k | output stringlengths 2 5.65k |
|---|---|
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and space is given in a line. The number of characters in the t... | "Correct Solution:
```
print(''.join(list(map(lambda i: i.upper(),input()))))
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and space is given in a line. The number of characters in the t... | "Correct Solution:
```
from functools import reduce
from operator import add
print(reduce(add, map(str.capitalize, input()[:]), ''))
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and space is given in a line. The number of characters in the t... | "Correct Solution:
```
import math
def run():
text = input().strip()
print(text.upper())
if __name__ == '__main__':
run()
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and space is given in a line. The number of characters in the t... | "Correct Solution:
```
a=input()
a=str.upper(a)
print(a)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and space is given in a line. The number of characters in the t... | "Correct Solution:
```
l = str(input())
print(str.upper(l))
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and space is given in a line. The number of characters in the t... | "Correct Solution:
```
a=str(input())
b=str.upper(a)
print(b)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and space is given in a line. The number of characters in the t... | "Correct Solution:
```
A=input()
print(A.upper())
``` |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and spa... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and spa... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and spa... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and spa... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and spa... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and spa... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and spa... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which replace all the lower-case letters of a given text with the corresponding captital letters.
Input
A text including lower-case letters, periods, and spa... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Constanze is the smartest girl in her village but she has bad eyesight.
One day, she was able to invent an incredible machine! When you pronounce letters, the machine will insc... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Constanze is the smartest girl in her village but she has bad eyesight.
One day, she was able to invent an incredible machine! When you pronounce letters, the machine will insc... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Constanze is the smartest girl in her village but she has bad eyesight.
One day, she was able to invent an incredible machine! When you pronounce letters, the machine will insc... | Yes |
### Instruction: Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Constanze is the smartest girl in her village but she has bad eyesight. One day, she was able to invent an incredible machine! When you pronounce letters, the machine will inscri... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Constanze is the smartest girl in her village but she has bad eyesight.
One day, she was able to invent an incredible machine! When you pronounce letters, the machine will insc... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Constanze is the smartest girl in her village but she has bad eyesight.
One day, she was able to invent an incredible machine! When you pronounce letters, the machine will insc... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Constanze is the smartest girl in her village but she has bad eyesight.
One day, she was able to invent an incredible machine! When you pronounce letters, the machine will insc... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Constanze is the smartest girl in her village but she has bad eyesight.
One day, she was able to invent an incredible machine! When you pronounce letters, the machine will insc... | 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 easy 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 easy 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 easy 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:
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player announces a word that satisfies the following conditions... | "Correct Solution:
```
n=int(input())
li=[input() for _ in range(n)]
if len(set(li))!=n:
print("No");exit()
else:
for i,j in zip(li,li[1:]):
if i[-1]!=j[0]:
print("No");exit()
print("Yes")
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player announces a word that satisfies the following conditions... | "Correct Solution:
```
print("No" if (lambda w:(sum([w.count(s)-1 for s in w])) or sum([1-(w[i][0] == w[i-1][-1]) for i in range(1,len(w))]))([input() for i in range(int(input()))]) else "Yes")
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player announces a word that satisfies the following conditions... | "Correct Solution:
```
L=[input()for x in' '*int(input())];print('YNeos'[any(i[-1]!=j[0]*(L.count(i))for i,j in zip(L,L[1:]))::2])
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player announces a word that satisfies the following conditions... | "Correct Solution:
```
n = int(input())
w = [input() for i in range(n)]
x = False
if n == len(set(w)):
if all(w[i-1][-1] == w[i][0] for i in range(1,n)):
x = True
print('Yes' if x else 'No')
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player announces a word that satisfies the following conditions... | "Correct Solution:
```
N = int(input())
w = [input()]
ans = 'Yes'
for i in range(N-1):
tmp = input()
if (tmp in w) or (w[-1][-1] != tmp[0]):
ans = 'No'
break
w.append(tmp)
print(ans)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player announces a word that satisfies the following conditions... | "Correct Solution:
```
l=[input() for _ in range(int(input()))]
for i,w in enumerate(l):
if i:
if l[i][0]==l[i-1][-1] and w not in l[:i]:
continue
exit(print('No'))
print('Yes')
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player announces a word that satisfies the following conditions... | "Correct Solution:
```
#b
N=int(input())
W=[None]*N
for i in range(N):
W[i] = input()
if all( W[i][0]==W[i-1][-1] for i in range(1,N) ) and len(set(W))==N:
print("Yes")
else:
print("No")
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player announces a word that satisfies the following conditions... | "Correct Solution:
```
N = int(input())
W = [input()]
for i in range(1,N):
w = input()
if W[i-1][-1] != w[0] or w in W:
print('No')
break
else:
W.append(w)
if len(W)==N:
print('Yes')
``` |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Takahashi is practicing shiritori alone again today.
Shiritori is a game as follows:
* In the first turn, a player announces any one word.
* In the subsequent turns, a player ... | No |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of what?" Output the answer.
Here, assume that the name of... | "Correct Solution:
```
S = input()
print(S[:S.rfind("FESTIVAL")])
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of what?" Output the answer.
Here, assume that the name of... | "Correct Solution:
```
#CODE FESTIVAL 2017 qual B a
s=input()
n=len(s)-len("FESTIVAL")
ans=""
for i in range(n):
ans+=s[i]
print(ans)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of what?" Output the answer.
Here, assume that the name of... | "Correct Solution:
```
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
s = input()
print(s[:len(s) - 8])
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of what?" Output the answer.
Here, assume that the name of... | "Correct Solution:
```
s=str(input())
print(s[:-8])
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of what?" Output the answer.
Here, assume that the name of... | "Correct Solution:
```
# CODE FESTIVAL 2017 予選 B: A – XXFESTIVAL
s = input()
print(s[:-8])
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of what?" Output the answer.
Here, assume that the name of... | "Correct Solution:
```
S = input()
if S[-8:] == "FESTIVAL":
print("{}".format(S[0:-8]))
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of what?" Output the answer.
Here, assume that the name of... | "Correct Solution:
```
def main():
s = input()
print(s[:-8])
if __name__ == "__main__":
main()
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of what?" Output the answer.
Here, assume that the name of... | "Correct Solution:
```
a = input().strip()
print(a[:-8])
``` |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Rng is going to a festival.
The name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: "Rng is going to a festival of ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Problem
Jennifer and Marian presented Carla with the string S.
However, Carla is not happy to receive the string S.
I wanted the string T.
The three decided to work together to... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Yaroslav thinks that two strings s and w, consisting of digits and having length n are non-comparable if there are two numbers, i and j (1 ≤ i, j ≤ n), such that si > wi and sj ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Yaroslav thinks that two strings s and w, consisting of digits and having length n are non-comparable if there are two numbers, i and j (1 ≤ i, j ≤ n), such that si > wi and sj ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Yaroslav thinks that two strings s and w, consisting of digits and having length n are non-comparable if there are two numbers, i and j (1 ≤ i, j ≤ n), such that si > wi and sj ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Yaroslav thinks that two strings s and w, consisting of digits and having length n are non-comparable if there are two numbers, i and j (1 ≤ i, j ≤ n), such that si > wi and sj ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Yaroslav thinks that two strings s and w, consisting of digits and having length n are non-comparable if there are two numbers, i and j (1 ≤ i, j ≤ n), such that si > wi and sj ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Yaroslav thinks that two strings s and w, consisting of digits and having length n are non-comparable if there are two numbers, i and j (1 ≤ i, j ≤ n), such that si > wi and sj ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Yaroslav thinks that two strings s and w, consisting of digits and having length n are non-comparable if there are two numbers, i and j (1 ≤ i, j ≤ n), such that si > wi and sj ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Yaroslav thinks that two strings s and w, consisting of digits and having length n are non-comparable if there are two numbers, i and j (1 ≤ i, j ≤ n), such that si > wi and sj ... | No |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen here, when the same character occurs multiple times, tha... | "Correct Solution:
```
from collections import Counter
c = Counter(frozenset(Counter(input()).items()) for _ in range(int(input())))
print(sum(x * (x - 1) // 2 for x in c.values()))
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen here, when the same character occurs multiple times, tha... | "Correct Solution:
```
n=int(input())
d={}
ans=0
for _ in range(n):
s=''.join(sorted(input()))
if s in d.keys():d[s]+=1;ans+=d[s]
else:d.setdefault(s,0)
print(ans)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen here, when the same character occurs multiple times, tha... | "Correct Solution:
```
N=int(input())
dict={}
cnt=0
for a in range(N):
s="".join(sorted(input()))
if s in dict:
dict[s]+=1
cnt+=dict[s]
else:
dict[s]=0
print(cnt)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen here, when the same character occurs multiple times, tha... | "Correct Solution:
```
n=int(input())
c=[''.join(sorted(input())) for _ in range(n)]
an=0
d={}
for i in c:
if i in d:
an += d[i]
d[i]+=1
else:
d[i]=1
print(an)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen here, when the same character occurs multiple times, tha... | "Correct Solution:
```
n=int(input())
s=[''.join(sorted(input())) for _ in range(n)]
dic={}
ans=0
for i in s:
t=dic.get(i,0)
ans+=t
dic[i]=t+1
print(ans)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen here, when the same character occurs multiple times, tha... | "Correct Solution:
```
import collections
N=int(input())
s=[str(sorted(input())) for i in range(N)]
c=collections.Counter(s)
print(sum((v*(v-1))//2 for v in c.values()))
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen here, when the same character occurs multiple times, tha... | "Correct Solution:
```
n=int(input())
d={}
count=0
for i in range(n):
s=tuple(sorted(input()))
if s not in d:
d[s]=0
count+=d[s]
d[s]+=1
print(count)
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen here, when the same character occurs multiple times, tha... | "Correct Solution:
```
from collections import Counter
n = int(input())
cnt_s = Counter([''.join(sorted(input())) for i in range(n)])
print(sum(v*(v - 1)//2 for v in cnt_s.values()))
``` |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen ... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen ... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
We will call a string obtained by arranging the characters contained in a string a in some order, an anagram of a.
For example, `greenbin` is an anagram of `beginner`. As seen ... | No |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowercase English letter.
Input
The input is given from St... | "Correct Solution:
```
if input() in list('aiueo'):
print('vowel')
else:
print('consonant')
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowercase English letter.
Input
The input is given from St... | "Correct Solution:
```
print("vowel" if input() in ["a","e","i","o","u"] else "consonant")
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowercase English letter.
Input
The input is given from St... | "Correct Solution:
```
print('vowel' if input() in ["a","e","i","o","u"] else "consonant")
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowercase English letter.
Input
The input is given from St... | "Correct Solution:
```
c=str(input())
if c in "aiueo":
print("vowel")
else:
print("consonant")
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowercase English letter.
Input
The input is given from St... | "Correct Solution:
```
print(input()in"aeiou"and"vowel"or"consonant")
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowercase English letter.
Input
The input is given from St... | "Correct Solution:
```
v="aiueo"
l=input()
if l in v:
print("vowel")
else:
print("consonant")
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowercase English letter.
Input
The input is given from St... | "Correct Solution:
```
c=input()
l=["a","i","u","e","o"]
print("vowel" if c in l else "consonant")
``` |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowercase English letter.
Input
The input is given from St... | "Correct Solution:
```
n = input()
print("vowel" if n in "aiueo" else "consonant")
``` |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowe... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowe... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowe... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowe... | Yes |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowe... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowe... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowe... | No |
### Instruction:
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.
Constraints
* c is a lowe... | No |
### Instruction:
Provide a correct Python 3 solution for this coding contest problem.
An English booklet has been created for publicizing Aizu to the world. When you read it carefully, you found a misnomer (an error in writing) on the last name of Masayuki Hoshina, the lord of the Aizu domain. The booklet says "Hoshin... | "Correct Solution:
```
import re
for _ in [0]*int(input()):
print(re.sub(r"Hoshino", "Hoshina", input()))
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.