message stringlengths 2 11.9k | message_type stringclasses 2 values | message_id int64 0 1 | conversation_id int64 137 108k | cluster float64 18 18 | __index_level_0__ int64 274 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kostya likes Codeforces contests very much. However, he is very disappointed that his solutions are frequently hacked. That's why he decided to obfuscate (intentionally make less readable) his code before upcoming contest.
To obfuscate the code, Kostya first looks at the first variable name used in his program and replaces all its occurrences with a single symbol a, then he looks at the second variable name that has not been replaced yet, and replaces all its occurrences with b, and so on. Kostya is well-mannered, so he doesn't use any one-letter names before obfuscation. Moreover, there are at most 26 unique identifiers in his programs.
You are given a list of identifiers of some program with removed spaces and line breaks. Check if this program can be a result of Kostya's obfuscation.
Input
In the only line of input there is a string S of lowercase English letters (1 β€ |S| β€ 500) β the identifiers of a program with removed whitespace characters.
Output
If this program can be a result of Kostya's obfuscation, print "YES" (without quotes), otherwise print "NO".
Examples
Input
abacaba
Output
YES
Input
jinotega
Output
NO
Note
In the first sample case, one possible list of identifiers would be "number string number character number string number". Here how Kostya would obfuscate the program:
* replace all occurences of number with a, the result would be "a string a character a string a",
* replace all occurences of string with b, the result would be "a b a character a b a",
* replace all occurences of character with c, the result would be "a b a c a b a",
* all identifiers have been replaced, thus the obfuscation is finished.
Submitted Solution:
```
import sys
n = input()
good = 'a'
for i in range (len(n)):
if n[i] == good or n[i] < good:
good = chr(ord(good) + 1)
else:
print('NO')
sys.exit()
print('YES')
``` | instruction | 0 | 3,845 | 18 | 7,690 |
No | output | 1 | 3,845 | 18 | 7,691 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kostya likes Codeforces contests very much. However, he is very disappointed that his solutions are frequently hacked. That's why he decided to obfuscate (intentionally make less readable) his code before upcoming contest.
To obfuscate the code, Kostya first looks at the first variable name used in his program and replaces all its occurrences with a single symbol a, then he looks at the second variable name that has not been replaced yet, and replaces all its occurrences with b, and so on. Kostya is well-mannered, so he doesn't use any one-letter names before obfuscation. Moreover, there are at most 26 unique identifiers in his programs.
You are given a list of identifiers of some program with removed spaces and line breaks. Check if this program can be a result of Kostya's obfuscation.
Input
In the only line of input there is a string S of lowercase English letters (1 β€ |S| β€ 500) β the identifiers of a program with removed whitespace characters.
Output
If this program can be a result of Kostya's obfuscation, print "YES" (without quotes), otherwise print "NO".
Examples
Input
abacaba
Output
YES
Input
jinotega
Output
NO
Note
In the first sample case, one possible list of identifiers would be "number string number character number string number". Here how Kostya would obfuscate the program:
* replace all occurences of number with a, the result would be "a string a character a string a",
* replace all occurences of string with b, the result would be "a b a character a b a",
* replace all occurences of character with c, the result would be "a b a c a b a",
* all identifiers have been replaced, thus the obfuscation is finished.
Submitted Solution:
```
s = str(input())
from collections import defaultdict
m = defaultdict(int)
valid = True
for i in range(len(s) - 1):
if ord(s[i]) > ord(s[i-1]):
m[s[i]] += 1
else:
if m[s[i]] == 0:
valid = False
print("YES" if valid else "NO")
``` | instruction | 0 | 3,846 | 18 | 7,692 |
No | output | 1 | 3,846 | 18 | 7,693 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs | instruction | 0 | 3,948 | 18 | 7,896 |
"Correct Solution:
```
s = str(input())
if(s[-1]=="s"):
print(s+"es")
else:
print(s+"s")
``` | output | 1 | 3,948 | 18 | 7,897 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs | instruction | 0 | 3,949 | 18 | 7,898 |
"Correct Solution:
```
S=input()
if S[-1] == 's':
print(S+"es")
else:
print(S+"s")
``` | output | 1 | 3,949 | 18 | 7,899 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs | instruction | 0 | 3,950 | 18 | 7,900 |
"Correct Solution:
```
s = input()
if s[-1] == "s":
print(s+"es")
else:
print(s+"s")
``` | output | 1 | 3,950 | 18 | 7,901 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs | instruction | 0 | 3,951 | 18 | 7,902 |
"Correct Solution:
```
S = input()
if S.endswith("s"): print(S + "es")
else: print(S + "s")
``` | output | 1 | 3,951 | 18 | 7,903 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs | instruction | 0 | 3,952 | 18 | 7,904 |
"Correct Solution:
```
s = input()
a = s[-1]
if(a == 's'):print(s+"es")
else:print(s+"s")
``` | output | 1 | 3,952 | 18 | 7,905 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs | instruction | 0 | 3,953 | 18 | 7,906 |
"Correct Solution:
```
a=input()
if(a[len(a)-1]=="s"):
a+="e"
print(a+"s")
``` | output | 1 | 3,953 | 18 | 7,907 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs | instruction | 0 | 3,954 | 18 | 7,908 |
"Correct Solution:
```
x=input()
if x[-1]=="s":
print(x+"es")
else:
print(x+"s")
``` | output | 1 | 3,954 | 18 | 7,909 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs | instruction | 0 | 3,955 | 18 | 7,910 |
"Correct Solution:
```
A = input()
A = A + "es" if A[-1] == "s" else A + "s"
print(A)
``` | output | 1 | 3,955 | 18 | 7,911 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs
Submitted Solution:
```
s=input()
s+=(s[-1]=='s')*'e'
print(s+'s')
``` | instruction | 0 | 3,956 | 18 | 7,912 |
Yes | output | 1 | 3,956 | 18 | 7,913 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs
Submitted Solution:
```
n=input()
print([n+"s",n+"es"][n[-1]=="s"])
``` | instruction | 0 | 3,957 | 18 | 7,914 |
Yes | output | 1 | 3,957 | 18 | 7,915 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs
Submitted Solution:
```
s = input()
if s[-1] == "s":
s += "e"
print(s + "s")
``` | instruction | 0 | 3,958 | 18 | 7,916 |
Yes | output | 1 | 3,958 | 18 | 7,917 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs
Submitted Solution:
```
s=str(input())
print(s+"s" if s[-1]!="s" else s+"es")
``` | instruction | 0 | 3,959 | 18 | 7,918 |
Yes | output | 1 | 3,959 | 18 | 7,919 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs
Submitted Solution:
```
print(input()+'s')
``` | instruction | 0 | 3,960 | 18 | 7,920 |
No | output | 1 | 3,960 | 18 | 7,921 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs
Submitted Solution:
```
S = input()
if S[-1] == 'e':
print(S+'s')
else:
print(S+'es')
``` | instruction | 0 | 3,961 | 18 | 7,922 |
No | output | 1 | 3,961 | 18 | 7,923 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs
Submitted Solution:
```
from pattern.en import pluralize, singularize
s=input()
print(pluralize(s))
``` | instruction | 0 | 3,962 | 18 | 7,924 |
No | output | 1 | 3,962 | 18 | 7,925 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.
In Taknese, the plural form of a noun is spelled based on the following rules:
* If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
* If a noun's singular form ends with `s`, append `es` to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Constraints
* S is a string of length 1 between 1000, inclusive.
* S contains only lowercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
Print the plural form of the given Taknese word.
Examples
Input
apple
Output
apples
Input
bus
Output
buses
Input
box
Output
boxs
Submitted Solution:
```
n = int(input())
count = 0
for i in range(n):
if i == 0:
count = 0
else:
if n % i == 0:
count += (n//i) -1
else:
count += (n//i)
print(count)
``` | instruction | 0 | 3,963 | 18 | 7,926 |
No | output | 1 | 3,963 | 18 | 7,927 |
Provide a correct Python 3 solution for this coding contest problem.
In "Takahashi-ya", a ramen restaurant, a bowl of ramen costs 700 yen (the currency of Japan), plus 100 yen for each kind of topping (boiled egg, sliced pork, green onions).
A customer ordered a bowl of ramen and told which toppings to put on his ramen to a clerk. The clerk took a memo of the order as a string S. S is three characters long, and if the first character in S is `o`, it means the ramen should be topped with boiled egg; if that character is `x`, it means the ramen should not be topped with boiled egg. Similarly, the second and third characters in S mean the presence or absence of sliced pork and green onions on top of the ramen.
Write a program that, when S is given, prints the price of the corresponding bowl of ramen.
Constraints
* S is a string of length 3.
* Each character in S is `o` or `x`.
Input
Input is given from Standard Input in the following format:
S
Output
Print the price of the bowl of ramen corresponding to S.
Examples
Input
oxo
Output
900
Input
ooo
Output
1000
Input
xxx
Output
700 | instruction | 0 | 4,044 | 18 | 8,088 |
"Correct Solution:
```
S=input()
T=S.count("o")
print(700+T*100)
``` | output | 1 | 4,044 | 18 | 8,089 |
Provide a correct Python 3 solution for this coding contest problem.
In "Takahashi-ya", a ramen restaurant, a bowl of ramen costs 700 yen (the currency of Japan), plus 100 yen for each kind of topping (boiled egg, sliced pork, green onions).
A customer ordered a bowl of ramen and told which toppings to put on his ramen to a clerk. The clerk took a memo of the order as a string S. S is three characters long, and if the first character in S is `o`, it means the ramen should be topped with boiled egg; if that character is `x`, it means the ramen should not be topped with boiled egg. Similarly, the second and third characters in S mean the presence or absence of sliced pork and green onions on top of the ramen.
Write a program that, when S is given, prints the price of the corresponding bowl of ramen.
Constraints
* S is a string of length 3.
* Each character in S is `o` or `x`.
Input
Input is given from Standard Input in the following format:
S
Output
Print the price of the bowl of ramen corresponding to S.
Examples
Input
oxo
Output
900
Input
ooo
Output
1000
Input
xxx
Output
700 | instruction | 0 | 4,045 | 18 | 8,090 |
"Correct Solution:
```
s = input()
x = s.count("o")
print(700+x*100)
``` | output | 1 | 4,045 | 18 | 8,091 |
Provide a correct Python 3 solution for this coding contest problem.
In "Takahashi-ya", a ramen restaurant, a bowl of ramen costs 700 yen (the currency of Japan), plus 100 yen for each kind of topping (boiled egg, sliced pork, green onions).
A customer ordered a bowl of ramen and told which toppings to put on his ramen to a clerk. The clerk took a memo of the order as a string S. S is three characters long, and if the first character in S is `o`, it means the ramen should be topped with boiled egg; if that character is `x`, it means the ramen should not be topped with boiled egg. Similarly, the second and third characters in S mean the presence or absence of sliced pork and green onions on top of the ramen.
Write a program that, when S is given, prints the price of the corresponding bowl of ramen.
Constraints
* S is a string of length 3.
* Each character in S is `o` or `x`.
Input
Input is given from Standard Input in the following format:
S
Output
Print the price of the bowl of ramen corresponding to S.
Examples
Input
oxo
Output
900
Input
ooo
Output
1000
Input
xxx
Output
700 | instruction | 0 | 4,046 | 18 | 8,092 |
"Correct Solution:
```
s=input()
print(int(700+100*s.count('o')))
``` | output | 1 | 4,046 | 18 | 8,093 |
Provide a correct Python 3 solution for this coding contest problem.
In "Takahashi-ya", a ramen restaurant, a bowl of ramen costs 700 yen (the currency of Japan), plus 100 yen for each kind of topping (boiled egg, sliced pork, green onions).
A customer ordered a bowl of ramen and told which toppings to put on his ramen to a clerk. The clerk took a memo of the order as a string S. S is three characters long, and if the first character in S is `o`, it means the ramen should be topped with boiled egg; if that character is `x`, it means the ramen should not be topped with boiled egg. Similarly, the second and third characters in S mean the presence or absence of sliced pork and green onions on top of the ramen.
Write a program that, when S is given, prints the price of the corresponding bowl of ramen.
Constraints
* S is a string of length 3.
* Each character in S is `o` or `x`.
Input
Input is given from Standard Input in the following format:
S
Output
Print the price of the bowl of ramen corresponding to S.
Examples
Input
oxo
Output
900
Input
ooo
Output
1000
Input
xxx
Output
700 | instruction | 0 | 4,047 | 18 | 8,094 |
"Correct Solution:
```
print(len(input().replace("x",""))*100+700)
``` | output | 1 | 4,047 | 18 | 8,095 |
Provide a correct Python 3 solution for this coding contest problem.
In "Takahashi-ya", a ramen restaurant, a bowl of ramen costs 700 yen (the currency of Japan), plus 100 yen for each kind of topping (boiled egg, sliced pork, green onions).
A customer ordered a bowl of ramen and told which toppings to put on his ramen to a clerk. The clerk took a memo of the order as a string S. S is three characters long, and if the first character in S is `o`, it means the ramen should be topped with boiled egg; if that character is `x`, it means the ramen should not be topped with boiled egg. Similarly, the second and third characters in S mean the presence or absence of sliced pork and green onions on top of the ramen.
Write a program that, when S is given, prints the price of the corresponding bowl of ramen.
Constraints
* S is a string of length 3.
* Each character in S is `o` or `x`.
Input
Input is given from Standard Input in the following format:
S
Output
Print the price of the bowl of ramen corresponding to S.
Examples
Input
oxo
Output
900
Input
ooo
Output
1000
Input
xxx
Output
700 | instruction | 0 | 4,048 | 18 | 8,096 |
"Correct Solution:
```
a=input()
print(a.count("o")*100+700)
``` | output | 1 | 4,048 | 18 | 8,097 |
Provide a correct Python 3 solution for this coding contest problem.
In "Takahashi-ya", a ramen restaurant, a bowl of ramen costs 700 yen (the currency of Japan), plus 100 yen for each kind of topping (boiled egg, sliced pork, green onions).
A customer ordered a bowl of ramen and told which toppings to put on his ramen to a clerk. The clerk took a memo of the order as a string S. S is three characters long, and if the first character in S is `o`, it means the ramen should be topped with boiled egg; if that character is `x`, it means the ramen should not be topped with boiled egg. Similarly, the second and third characters in S mean the presence or absence of sliced pork and green onions on top of the ramen.
Write a program that, when S is given, prints the price of the corresponding bowl of ramen.
Constraints
* S is a string of length 3.
* Each character in S is `o` or `x`.
Input
Input is given from Standard Input in the following format:
S
Output
Print the price of the bowl of ramen corresponding to S.
Examples
Input
oxo
Output
900
Input
ooo
Output
1000
Input
xxx
Output
700 | instruction | 0 | 4,050 | 18 | 8,100 |
"Correct Solution:
```
S = input()
print(700+(S.count("o")*100))
``` | output | 1 | 4,050 | 18 | 8,101 |
Provide a correct Python 3 solution for this coding contest problem.
In "Takahashi-ya", a ramen restaurant, a bowl of ramen costs 700 yen (the currency of Japan), plus 100 yen for each kind of topping (boiled egg, sliced pork, green onions).
A customer ordered a bowl of ramen and told which toppings to put on his ramen to a clerk. The clerk took a memo of the order as a string S. S is three characters long, and if the first character in S is `o`, it means the ramen should be topped with boiled egg; if that character is `x`, it means the ramen should not be topped with boiled egg. Similarly, the second and third characters in S mean the presence or absence of sliced pork and green onions on top of the ramen.
Write a program that, when S is given, prints the price of the corresponding bowl of ramen.
Constraints
* S is a string of length 3.
* Each character in S is `o` or `x`.
Input
Input is given from Standard Input in the following format:
S
Output
Print the price of the bowl of ramen corresponding to S.
Examples
Input
oxo
Output
900
Input
ooo
Output
1000
Input
xxx
Output
700 | instruction | 0 | 4,051 | 18 | 8,102 |
"Correct Solution:
```
s=input();print(700+100*(s.count('o')))
``` | output | 1 | 4,051 | 18 | 8,103 |
Provide a correct Python 3 solution for this coding contest problem.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No | instruction | 0 | 4,076 | 18 | 8,152 |
"Correct Solution:
```
# coding: utf-8
w = input()
print("No" if sum(w.count(s)%2 for s in w) else "Yes")
``` | output | 1 | 4,076 | 18 | 8,153 |
Provide a correct Python 3 solution for this coding contest problem.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No | instruction | 0 | 4,077 | 18 | 8,154 |
"Correct Solution:
```
w = input()
for c in w:
if w.count(c) % 2:
print("No")
quit()
print("Yes")
``` | output | 1 | 4,077 | 18 | 8,155 |
Provide a correct Python 3 solution for this coding contest problem.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No | instruction | 0 | 4,078 | 18 | 8,156 |
"Correct Solution:
```
s=input()
if all(s.count(i)%2==0 for i in set(s)):
print('Yes')
else:
print('No')
``` | output | 1 | 4,078 | 18 | 8,157 |
Provide a correct Python 3 solution for this coding contest problem.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No | instruction | 0 | 4,079 | 18 | 8,158 |
"Correct Solution:
```
S = input()
if all([S.count(i) % 2 == 0 for i in S]):
print('Yes')
else:
print('No')
``` | output | 1 | 4,079 | 18 | 8,159 |
Provide a correct Python 3 solution for this coding contest problem.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No | instruction | 0 | 4,080 | 18 | 8,160 |
"Correct Solution:
```
w=input()
print("YNeos"[sum(map(lambda x:w.count(x)%2,w))!=0::2])
``` | output | 1 | 4,080 | 18 | 8,161 |
Provide a correct Python 3 solution for this coding contest problem.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No | instruction | 0 | 4,081 | 18 | 8,162 |
"Correct Solution:
```
s=input()
f=True
for a in s:
if s.count(a)%2 != 0:
f=False
print('Yes' if f else 'No')
``` | output | 1 | 4,081 | 18 | 8,163 |
Provide a correct Python 3 solution for this coding contest problem.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No | instruction | 0 | 4,082 | 18 | 8,164 |
"Correct Solution:
```
s=input();print('NYoe s'[all([s.count(i)%2==0 for i in set(s)])::2])
``` | output | 1 | 4,082 | 18 | 8,165 |
Provide a correct Python 3 solution for this coding contest problem.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No | instruction | 0 | 4,083 | 18 | 8,166 |
"Correct Solution:
```
s=input()
print("Yes" if all([s.count(i)%2==0 for i in s]) else "No")
``` | output | 1 | 4,083 | 18 | 8,167 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No
Submitted Solution:
```
w = input()
for i in set(w):
if w.count(i) % 2 == 1:
print("No")
exit()
print("Yes")
``` | instruction | 0 | 4,084 | 18 | 8,168 |
Yes | output | 1 | 4,084 | 18 | 8,169 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No
Submitted Solution:
```
w=input()
ws=list(set(w))
ans='Yes'
for i in ws:
if w.count(i)%2==1:
ans='No'
print(ans)
``` | instruction | 0 | 4,085 | 18 | 8,170 |
Yes | output | 1 | 4,085 | 18 | 8,171 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No
Submitted Solution:
```
w=input()
if all([w.count(i)%2==0 for i in w]):
print("Yes")
else:
print("No")
``` | instruction | 0 | 4,086 | 18 | 8,172 |
Yes | output | 1 | 4,086 | 18 | 8,173 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No
Submitted Solution:
```
w = input()
if all(w.count(i)%2==0 for i in w):
print("Yes")
else:
print("No")
``` | instruction | 0 | 4,087 | 18 | 8,174 |
Yes | output | 1 | 4,087 | 18 | 8,175 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No
Submitted Solution:
```
from collections import Counter
w = input()
flag = 0
counter = Counter(w)
for word, cnt in counter.most_common():
if cnt % 2 != 0:
flag = 1
print("NO")
if flag == 0:
print("YES")
``` | instruction | 0 | 4,088 | 18 | 8,176 |
No | output | 1 | 4,088 | 18 | 8,177 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No
Submitted Solution:
```
w=list(input())
w.sort()
c=[]
for i in range(len(w)):
k=i+1
for k in range(len(w)):
if w[i]==w[k]:
c.append(1)
if len(c)%2==0:
print("Yes")
else:
print("No")
``` | instruction | 0 | 4,089 | 18 | 8,178 |
No | output | 1 | 4,089 | 18 | 8,179 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No
Submitted Solution:
```
s = input()
from collections import Counter
print(all([v%2==0 for v in Counter(s).values()]))
``` | instruction | 0 | 4,090 | 18 | 8,180 |
No | output | 1 | 4,090 | 18 | 8,181 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Let w be a string consisting of lowercase letters. We will call w beautiful if the following condition is satisfied:
* Each lowercase letter of the English alphabet occurs even number of times in w.
You are given the string w. Determine if w is beautiful.
Constraints
* 1 \leq |w| \leq 100
* w consists of lowercase letters (`a`-`z`).
Input
The input is given from Standard Input in the following format:
w
Output
Print `Yes` if w is beautiful. Print `No` otherwise.
Examples
Input
abaccaba
Output
Yes
Input
hthth
Output
No
Submitted Solution:
```
w = input()
for t in w:
if any(w.count(t)%2) == 0:
print('Yes')
else:
print('No')
``` | instruction | 0 | 4,091 | 18 | 8,182 |
No | output | 1 | 4,091 | 18 | 8,183 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Tom loves vowels, and he likes long words with many vowels. His favorite words are vowelly words. We say a word of length k is vowelly if there are positive integers n and m such that nβ
m = k and when the word is written by using n rows and m columns (the first row is filled first, then the second and so on, with each row filled from left to right), every vowel of the English alphabet appears at least once in every row and every column.
You are given an integer k and you must either print a vowelly word of length k or print -1 if no such word exists.
In this problem the vowels of the English alphabet are 'a', 'e', 'i', 'o' ,'u'.
Input
Input consists of a single line containing the integer k (1β€ k β€ 10^4) β the required length.
Output
The output must consist of a single line, consisting of a vowelly word of length k consisting of lowercase English letters if it exists or -1 if it does not.
If there are multiple possible words, you may output any of them.
Examples
Input
7
Output
-1
Input
36
Output
agoeuioaeiruuimaeoieauoweouoiaouimae
Note
In the second example, the word "agoeuioaeiruuimaeoieauoweouoiaouimae" can be arranged into the following 6 Γ 6 grid:
<image>
It is easy to verify that every row and every column contain all the vowels.
Submitted Solution:
```
v='aeiou'
a=[v[i:]+v[:i]for i in range(5)]
k=int(input())
n=5
while n*n<k and k%n:n+=1
print(((''.join((x*n)[:n]for x in a)*k)[:k],-1)[n*n>k])
``` | instruction | 0 | 4,231 | 18 | 8,462 |
Yes | output | 1 | 4,231 | 18 | 8,463 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Tom loves vowels, and he likes long words with many vowels. His favorite words are vowelly words. We say a word of length k is vowelly if there are positive integers n and m such that nβ
m = k and when the word is written by using n rows and m columns (the first row is filled first, then the second and so on, with each row filled from left to right), every vowel of the English alphabet appears at least once in every row and every column.
You are given an integer k and you must either print a vowelly word of length k or print -1 if no such word exists.
In this problem the vowels of the English alphabet are 'a', 'e', 'i', 'o' ,'u'.
Input
Input consists of a single line containing the integer k (1β€ k β€ 10^4) β the required length.
Output
The output must consist of a single line, consisting of a vowelly word of length k consisting of lowercase English letters if it exists or -1 if it does not.
If there are multiple possible words, you may output any of them.
Examples
Input
7
Output
-1
Input
36
Output
agoeuioaeiruuimaeoieauoweouoiaouimae
Note
In the second example, the word "agoeuioaeiruuimaeoieauoweouoiaouimae" can be arranged into the following 6 Γ 6 grid:
<image>
It is easy to verify that every row and every column contain all the vowels.
Submitted Solution:
```
# from sys import stdin
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
si = lambda: input()
msi = lambda: map(int, stdin.readline().split())
lsi = lambda: list(msi())
n=ii()
if n<25:
print(-1)
exit(0)
else:
for i in range(5,n//2+1):
if n%i==0:
n1=n/i
n2=i
break;
else:
print(-1)
exit(0)
if n%25==0:
s = "aeioueiouaiouaeouaeiuaeio"*(n//25)
print(s)
exit(0)
if n1<5:
print(-1)
exit(0)
else:
s="aeiou"*(n//5)
i = n-len(s)
if i==1:
s+="a"
elif i==2:
s+="ae"
elif i==3:
s+="aei"
elif i==4:
s+="aeio"
print(s)
``` | instruction | 0 | 4,233 | 18 | 8,466 |
Yes | output | 1 | 4,233 | 18 | 8,467 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Tom loves vowels, and he likes long words with many vowels. His favorite words are vowelly words. We say a word of length k is vowelly if there are positive integers n and m such that nβ
m = k and when the word is written by using n rows and m columns (the first row is filled first, then the second and so on, with each row filled from left to right), every vowel of the English alphabet appears at least once in every row and every column.
You are given an integer k and you must either print a vowelly word of length k or print -1 if no such word exists.
In this problem the vowels of the English alphabet are 'a', 'e', 'i', 'o' ,'u'.
Input
Input consists of a single line containing the integer k (1β€ k β€ 10^4) β the required length.
Output
The output must consist of a single line, consisting of a vowelly word of length k consisting of lowercase English letters if it exists or -1 if it does not.
If there are multiple possible words, you may output any of them.
Examples
Input
7
Output
-1
Input
36
Output
agoeuioaeiruuimaeoieauoweouoiaouimae
Note
In the second example, the word "agoeuioaeiruuimaeoieauoweouoiaouimae" can be arranged into the following 6 Γ 6 grid:
<image>
It is easy to verify that every row and every column contain all the vowels.
Submitted Solution:
```
n = int(input())
k = 5
while k * k <= n and n % k != 0:
k += 1
s = 'aeiou'
if k * k <= n and n % k == 0:
for i in range(n//k):
for j in range(k):
print(s[(i+j)%5], end='')
else:
print("-1")
``` | instruction | 0 | 4,234 | 18 | 8,468 |
Yes | output | 1 | 4,234 | 18 | 8,469 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Tom loves vowels, and he likes long words with many vowels. His favorite words are vowelly words. We say a word of length k is vowelly if there are positive integers n and m such that nβ
m = k and when the word is written by using n rows and m columns (the first row is filled first, then the second and so on, with each row filled from left to right), every vowel of the English alphabet appears at least once in every row and every column.
You are given an integer k and you must either print a vowelly word of length k or print -1 if no such word exists.
In this problem the vowels of the English alphabet are 'a', 'e', 'i', 'o' ,'u'.
Input
Input consists of a single line containing the integer k (1β€ k β€ 10^4) β the required length.
Output
The output must consist of a single line, consisting of a vowelly word of length k consisting of lowercase English letters if it exists or -1 if it does not.
If there are multiple possible words, you may output any of them.
Examples
Input
7
Output
-1
Input
36
Output
agoeuioaeiruuimaeoieauoweouoiaouimae
Note
In the second example, the word "agoeuioaeiruuimaeoieauoweouoiaouimae" can be arranged into the following 6 Γ 6 grid:
<image>
It is easy to verify that every row and every column contain all the vowels.
Submitted Solution:
```
def Fact(n):
for i in range(5, n//2 + 1):
if n%i == 0 and n//i > 5:
return (i, n//i)
return (1, 1)
p = int(input())
l = 'aeiou'
if p == 1:
print(-1)
else:
n, m = Fact(p)
if n==1:
print(-1)
else:
for i in range(n):
for j in range(m):
print(l[(j+i)%5], end="")
``` | instruction | 0 | 4,235 | 18 | 8,470 |
No | output | 1 | 4,235 | 18 | 8,471 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Tom loves vowels, and he likes long words with many vowels. His favorite words are vowelly words. We say a word of length k is vowelly if there are positive integers n and m such that nβ
m = k and when the word is written by using n rows and m columns (the first row is filled first, then the second and so on, with each row filled from left to right), every vowel of the English alphabet appears at least once in every row and every column.
You are given an integer k and you must either print a vowelly word of length k or print -1 if no such word exists.
In this problem the vowels of the English alphabet are 'a', 'e', 'i', 'o' ,'u'.
Input
Input consists of a single line containing the integer k (1β€ k β€ 10^4) β the required length.
Output
The output must consist of a single line, consisting of a vowelly word of length k consisting of lowercase English letters if it exists or -1 if it does not.
If there are multiple possible words, you may output any of them.
Examples
Input
7
Output
-1
Input
36
Output
agoeuioaeiruuimaeoieauoweouoiaouimae
Note
In the second example, the word "agoeuioaeiruuimaeoieauoweouoiaouimae" can be arranged into the following 6 Γ 6 grid:
<image>
It is easy to verify that every row and every column contain all the vowels.
Submitted Solution:
```
'''n=int(input())
l=[]
S=0;
for i in range(0,n):
s=input().rstrip()
x=list(s)
l.append(x[0])
t=list(set(l))
for i in range(0,len(t)):
g=t[i]
if l.count(g)==0:
continue;
elif g in l and l.count(g)%2==0:
if l.count(g)==2:
continue;
elif l.count(g)==4:
S+=2;
else:
S=S+(l.count(g)-1)
elif g in l and l.count(g)%2!=0:
if l.count(g)==3:
S=S+1;
else:
S=S+(l.count(g)-1)
print(S)'''
n=int(input())
import math
if n==1 or n==0:
print(-1)
else:
U=0;
for i in range(2,math.floor(math.sqrt(n))+1):
if n%i==0:
U=1;
break;
if U==1:
l=['a','e','i','o','u']
for i in range(5,1000000):
if n%i==0:
a=i;
b=n//i;
if b>=5:
break
for i in range(0,a):
D=0+i;
for j in range(0,b):
if D<len(l):
print(l[D],end='')
D+=1;
else:
print(l[0],end='')
D=1;
else:
print(-1)
``` | instruction | 0 | 4,236 | 18 | 8,472 |
No | output | 1 | 4,236 | 18 | 8,473 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Tom loves vowels, and he likes long words with many vowels. His favorite words are vowelly words. We say a word of length k is vowelly if there are positive integers n and m such that nβ
m = k and when the word is written by using n rows and m columns (the first row is filled first, then the second and so on, with each row filled from left to right), every vowel of the English alphabet appears at least once in every row and every column.
You are given an integer k and you must either print a vowelly word of length k or print -1 if no such word exists.
In this problem the vowels of the English alphabet are 'a', 'e', 'i', 'o' ,'u'.
Input
Input consists of a single line containing the integer k (1β€ k β€ 10^4) β the required length.
Output
The output must consist of a single line, consisting of a vowelly word of length k consisting of lowercase English letters if it exists or -1 if it does not.
If there are multiple possible words, you may output any of them.
Examples
Input
7
Output
-1
Input
36
Output
agoeuioaeiruuimaeoieauoweouoiaouimae
Note
In the second example, the word "agoeuioaeiruuimaeoieauoweouoiaouimae" can be arranged into the following 6 Γ 6 grid:
<image>
It is easy to verify that every row and every column contain all the vowels.
Submitted Solution:
```
import math
n = int(input())
f = 1
for i in range(2, math.ceil(n**(1/2))+1):
if n%i == 0 and i>=5 and n//i >= 5:
f = 0
k, m = i, n//i
break
if f:
print(-1)
else:
s = ''
t = 'aeiou'*100
for i in range(k):
s += t[i:m]+t[:i]
print(s)
``` | instruction | 0 | 4,237 | 18 | 8,474 |
No | output | 1 | 4,237 | 18 | 8,475 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Tom loves vowels, and he likes long words with many vowels. His favorite words are vowelly words. We say a word of length k is vowelly if there are positive integers n and m such that nβ
m = k and when the word is written by using n rows and m columns (the first row is filled first, then the second and so on, with each row filled from left to right), every vowel of the English alphabet appears at least once in every row and every column.
You are given an integer k and you must either print a vowelly word of length k or print -1 if no such word exists.
In this problem the vowels of the English alphabet are 'a', 'e', 'i', 'o' ,'u'.
Input
Input consists of a single line containing the integer k (1β€ k β€ 10^4) β the required length.
Output
The output must consist of a single line, consisting of a vowelly word of length k consisting of lowercase English letters if it exists or -1 if it does not.
If there are multiple possible words, you may output any of them.
Examples
Input
7
Output
-1
Input
36
Output
agoeuioaeiruuimaeoieauoweouoiaouimae
Note
In the second example, the word "agoeuioaeiruuimaeoieauoweouoiaouimae" can be arranged into the following 6 Γ 6 grid:
<image>
It is easy to verify that every row and every column contain all the vowels.
Submitted Solution:
```
k = int(input())
rs = [
'aeiou',
'eioua',
'iouae',
'ouaei',
'uaeio',
]
if k < 25:
print(-1)
else:
for r in range(5, k + 1):
if k % r == 0:
c = k // r
if c < 5:
continue
a = c - 5
for i in range(r):
print((rs[i % 5] * ((c + 4) // 5))[:c])
break
else:
print(-1)
``` | instruction | 0 | 4,238 | 18 | 8,476 |
No | output | 1 | 4,238 | 18 | 8,477 |
Provide a correct Python 3 solution for this coding contest problem.
We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.
Find the maximum number of consecutive rainy days in this period.
Constraints
* |S| = 3
* Each character of S is `S` or `R`.
Input
Input is given from Standard Input in the following format:
S
Output
Print the maximum number of consecutive rainy days in the period.
Examples
Input
RRS
Output
2
Input
SSS
Output
0
Input
RSR
Output
1 | instruction | 0 | 4,811 | 18 | 9,622 |
"Correct Solution:
```
s = input()
if s == 'RSR':
print(1)
else:
print(s.count(('R')))
``` | output | 1 | 4,811 | 18 | 9,623 |
Provide a correct Python 3 solution for this coding contest problem.
We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.
Find the maximum number of consecutive rainy days in this period.
Constraints
* |S| = 3
* Each character of S is `S` or `R`.
Input
Input is given from Standard Input in the following format:
S
Output
Print the maximum number of consecutive rainy days in the period.
Examples
Input
RRS
Output
2
Input
SSS
Output
0
Input
RSR
Output
1 | instruction | 0 | 4,812 | 18 | 9,624 |
"Correct Solution:
```
S = input()
if S == "RSR":
print(1)
else:
print(S.count('R'))
``` | output | 1 | 4,812 | 18 | 9,625 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.