output_description
stringlengths
15
956
submission_id
stringlengths
10
10
status
stringclasses
3 values
problem_id
stringlengths
6
6
input_description
stringlengths
9
2.55k
attempt
stringlengths
1
13.7k
problem_description
stringlengths
7
5.24k
samples
stringlengths
2
2.72k
If N=1, print `Hello World`; if N=2, print A+B. * * *
s393268364
Wrong Answer
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
print("Hello World!" if input() == "1" else int(input()) + int(input()))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s538505037
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n=int(input()) if n==1: print("Hello World") a=int(input()) b=int(input()) else: print(a+b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s186244488
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n=int(input() if n==1: print("Hello World") else: a=int(input()) b=int(input()) print(a+b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s620363374
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
print("Hello World!" if input() == 1 else int(input()) + int(input()))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s468505890
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n=int(input()) if n==1:print('Hello World') a=int(input()) b=int(input()) else:print(a+b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s790723094
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N=int(input()) if N=1: print("Hello World") else: a=int(input()) b=int(input()) print(a+b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s379594906
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
if input()='1': print(Hello World) else: A=int(input()) B=int(input()) print(A+B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s483656981
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
if int(input()) == 2: print(int(input())+int(int(input()) else: print('Hello World')
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s028953938
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
a = [int(input()) for i in range(3)] if a[0] == 2: print("Hello World") elif print(a[1]+a[2])
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s222131972
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1 : print("Hello World") else : A = int(input()) B = int(input()) print(A + B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s108583825
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N = 1: print("Hello World") else: A = int(input()) B = int(input()) print( A + B )
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s306938297
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print('Hello World') else N == 2: A = int(input()) B = int(input()) print(A+B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s949738666
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Hallo World") else: A, B = [int(x) for x in input()] print(A+B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s894430553
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
a = int(input()) list=[int(input()) for i in range(2)] if a == 1: print(Hello World) else: print(list[0]+list[1])
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s776655344
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n= int(input()) if n == 1: print("Hello World") else: a = int(input())+int(input()) print(a)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s890607613
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print(Hello World) else: AB = int(input()) for _ in range(2): print(sum(AB))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s987500671
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Heloo World") else: A = int(input()) B = int(input()) print(A + B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s420771186
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n = int(input()) if n == 1: print("Hello World") else: a = int(input()) b = int(input()) print(a + b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s734526578
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
a = int(input()) if a == 1: print(Hello World) else: list=[int(input()) for i in range(2)] print(list[0]+list[1])
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s865892699
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n = int(input()) print('Hello World' if n == 1) if n == 2: a = [int(input()) for _ in range(2)] print(sum(a))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s039639842
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print('Hello World) if N == 2: A =int(input()) B =int(input()) print(A+B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s675565512
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Hello World") else N == 2: A = int(input()) B = int(input()) print(A + B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s525986743
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Hello World") else if N == 2: A, B = map(int, input().split()) print(A + B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s984926411
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Hello World") else if N == 2: A = int(input()) B = int(input()) print(A + B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s858225331
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Hello World") elif N == 2: a,b = int(input().split()) print(a+b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s243527442
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n = int(input("") if n==1: print("Hello World") elif n==2: a = int(input("")) b = int(input("")) print(a+b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s389065110
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
#!/usr/bin/env python3 import sys from math import * from itertools import * from collections import * from functools import * try: from math import gcd except Exception: from fractions import gcd readInt = lambda: int(sys.stdin.readline()) readIntN = lambda: [int(v) for v in sys.stdin.readline().split(' ')] def main(): n = readInt() result = 'Hello World' if n == 2 a = readInt() b = readInt() result = a + b print(result) if __name__ == '__main__': main()
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s348099017
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i=0;i<(int)(n);i++) #define all(x) (x).begin(),(x).end() typedef long long ll; const int MOD = (int)1e9 + 7; int main(){ int n; cin >> n; if(n==1){ cout << "Hello World" << endl; return 0; } int a,b; cin >> a >> b; cout << a + b << endl; }
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s761201856
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Hallo World") else: list = [] for _ in range(N): list.append(int(input())) A,B = list print(A+B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s779492564
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: answer = "Hello World" print(answer) elif N == 2: A,B = map(int,input().split()) answer = A + B print(int(answer))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s802196422
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n = int(input()) if n == 1: print("Hello World") elif n == 2: a = int(input()) b = int(input()) print(a+b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s142652236
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
import io import sys line1 = sys.stdin.readline().rstrip() line2 = sys.stdin.readline().rstrip() line3 = sys.stdin.readline().rstrip() if int(line1) == 1: return "Hello World" else: return int(line2)+int(line3) solve()
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s594752511
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Hello World") else: A = int(input()) B = int(input()) print(A+B
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s004610017
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: answer = "Hello World" print(answer) elif N == 2: A = input(int()) B = input(int()) answer = A + B print(int(answer))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s387373113
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
import itertools N = int(input()) params = [] for i in range(N): xyh = [int(n) for n in input().split()] params.append(xyh) for cxi, cyi in itertools.product(range(101), range(101)): for k in range(N): if params[k][2] > 0: hight = params[k][2] + abs(params[k][0] - cxi) + abs(params[k][1] - cyi) for k in range(N): if params[k][2] != max(hight - abs(params[k][0] - cxi) - abs(params[k][1] - cyi), 0) break else: print(cxi, cyi, hight)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s616886166
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n = int(input()) print('Hello World' if n == 1) if n == 2: for _ in range(2): a = [int(input())] print(sum(a))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s352453585
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n = int(input) print('Hello World' if n == 1) if n == 2: for _ in range(2): a = [int(input())] print(a[0]+a[1])
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s753281281
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
a = int(input()) if a = 1 : print("Hello World") else : b = int(input()) c = int(input()) print(b+c)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s808788443
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
a = int(input()) if a == 1: print("Hello Wor\ld") elif: b = int(input()) c = int(input()) print(b + c)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s021383667
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
age = int(input()) if age == 1: print('Hello'World) else: a = int(input()) b = int(input()) print(a+b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s127330239
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
takahashi = list(int(input()) for i in range(3)) if takahashi[0] = 1: print("Hello World") else : print(A+B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s458292500
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
if int(input())==1: print("Hello World") else: a = int(input()) b = int(input()) print(a+b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s733009221
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Hello World") else: A = int(input()) B = int(input()) print(A+B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s178171875
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n = input() if n = 1: print("Helllo World") else: a, b = map(int, input().split()) print(a + b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s959025634
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Hallo World") else: print(int(input()) + int(input()))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s869951942
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
age = int(input()) if age == 1: print('Hello world") elif age == 2: A = input() B = input() print(A+B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s827746136
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
X = int(input()) if X == 1: print("Hello World") else: A = int(input()) B = int(input() print(A + B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s931238011
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Hello World") else if N == 2: A, B = input() for i in 2 print(A + B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s782486044
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = input() if N == 2: A = int(input()) B = int(input()) print(A+B) else: print('Hello World')
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s554208604
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1 : print("Hello World") else : A = int(input()) B = int(input()) print(A + B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s911508868
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = [int(input()) for _ in range(n)] if N[0] == 1 then: print('Hello World') else: print(N[1] + N[2])
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s722401269
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 2: A = int(input()) B = int(input()) print(A+B) else: print('Hello World')
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s261820056
Accepted
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
print("Hello World" if input() == "1" else sum([int(input()) for _ in range(2)]))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s794014685
Accepted
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
j = input print("Hello World" if "1" == j() else int(j()) + int(j()))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s095562609
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
i=int(input);print(i()+i()if1<i()else'Hello World')
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s050429014
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
d = [int(input()) for i in range(0, 3)] print("Hello World" if d[0] == 1 else sum(d[1:]))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s845863471
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N=int(input()) if N=1: print("Hello World") else: A,B=map(int,input().split()) print(A+B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s860845286
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
i = int(input) print(i() + i() if 1 < i() else "Hello World")
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s745115272
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
x = [int(input()) for i in range(3)] print("Hello World" if x[0] == 1 else x[1] + x[2])
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s322144249
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n = int(input()) lis = [list(map(int, input().split())) for i in range(n)] li = [] for nu, nuu, nuuu in lis: if nuuu != 0: li.append([nu, nuu, nuuu]) for i in range(101): for j in range(101): s = set() for h in range(len(li)): num = abs(li[h][0] - i) + abs(li[h][1] - j) if num + li[h][2] < 0: s.add(num + li[h][2] + 1) s.add(num + li[h][2]) if len(s) == 1: for num in s: print(i, j, num)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s621726682
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
import sys if sys.platform =='ios': sys.stdin=open('input_file.txt') n=int(input()) if n=1: print("Hello World") if n=2: a=int(input()) b=int(input()) print(a+b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s080265760
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) hxy = [] for _ in range(N): x, y, h = map(int, input().split()) hxy.append([h, x, y]) hxy.sort(reverse=True) xy = [[x, y] for x in range(101) for y in range(101)] for i in range(len(hxy) - 1): h1, x1, y1 = hxy[i] for j in range(i + 1, len(hxy)): h2, x2, y2 = hxy[j] xy_copy = xy.copy() if h1 == 0 and h2 == 0: xy.remove([x1, y1]) xy.remove([x2, y2]) continue elif h1 == 0: for x, y in xy_copy: if abs(x - x2) + abs(y - y2) - abs(x - x1) - abs(y - y1) + h2 > 0: xy.remove([x, y]) if len(xy) == 1: x, y = xy[0] print(x, " ", y, " ", h1 + abs(x - x1) + abs(y - y1)) exit() continue elif h2 == 0: for x, y in xy_copy: if abs(x - x1) + abs(y - y1) - abs(x - x2) - abs(y - y2) + h1 > 0: xy.remove[x, y] if len(xy) == 1: x, y = xy[0] print(x, " ", y, " ", h1 + abs(x - x1) + abs(y - y1)) exit() continue for x, y in xy_copy: if abs(x - x1) + abs(y - y1) - abs(x - x2) - abs(y - y2) != h2 - h1: xy.remove([x, y]) if len(xy) == 1: x, y = xy[0] print(x, " ", y, " ", h1 + abs(x - x1) + abs(y - y1)) exit()
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s279984569
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N,T=map(int,input().split()) li = [list(map(int,input().split())) for i in range(N)] t_cost=[T - li[i][1] for i in range(N)] if(all(x < 0 for x in t_cost)): print('TLE') else: t_cost_1=[] for i in range(N): if(t_cost[i]>=0): t_cost_1.append(i) else: print(min([li[t_cost_1[i]][0] for i in range(len(t_cost_1))]))
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s294870045
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
dat0 = input() dat1 = input() dat2 = input() if dat0 == 1: print("Hello World") else ans = int(dat1) + int(dat2) print(ans)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s196338611
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
n = int(input()) if n=1: print('Hello World') else: a = int(input()) b = int(input()) print(a+b)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s836830626
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
a = int(input()) if a == 1: print(Hello World) else: list=[input() for i in range(2)] print(list[0]+list[1])
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s954262347
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
N = int(input()) if N == 1: print("Hello World") else: A = int(input()) B = int(input()) print(A+B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
If N=1, print `Hello World`; if N=2, print A+B. * * *
s450050725
Runtime Error
p03238
Input is given from Standard Input in one of the following formats: 1 2 A B
if input()=='1': print(Hello World) else input()=='2': A=int(input()) B=int(input()) print(A+B)
Statement In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him.
[{"input": "1", "output": "Hello World\n \n\nAs N=1, Takahashi is one year old. Thus, we should print `Hello World`.\n\n* * *"}, {"input": "2\n 3\n 5", "output": "8\n \n\nAs N=2, Takahashi is two years old. Thus, we should print A+B, which is 8\nsince A=3 and B=5."}]
Print the number of strings that can be possibly obtained by repeatedly performing the operation, modulo 998244353. * * *
s658663532
Wrong Answer
p03392
Input is given from Standard Input in the following format: S
import sys input = sys.stdin.readline import numpy as np MOD = 998244353 S = input().rstrip() arr = np.array( list(S.replace("a", "0").replace("b", "1").replace("c", "2")), dtype=np.int32 ) def solve_naive(S): se = set([S]) q = [S] while q: S = q.pop() for i in range(len(S) - 1): x, y = S[i : i + 2] if x == y: continue for t in "abc": if t != x and t != y: T = S[:i] + t + t + S[i + 2 :] if T not in se: q.append(T) se.add(T) return len(se) LS = len(S) if LS < 6: answer = solve_naive(S) print(answer) exit() # 適当な必要条件のもと全部作れる # mod 3不変量 answer = pow(3, LS - 1, MOD) # 同一値の連続が存在しないものを間引く if LS % 3 == 0: x, y = (3 + MOD) // 2, 0 for _ in range(LS // 3): x, y = 4 * x + 4 * y, 2 * x + 6 * y x %= MOD y %= MOD if arr.sum() % 3 == 0: answer -= x else: answer -= y else: answer -= pow(2, LS - 1, MOD) # 初手に完成しているやつは使って良い if (arr[:-1] != arr[1:]).all(): answer += 1 answer %= MOD print(answer)
Statement You are given a string S consisting of `a`,`b` and `c`. Find the number of strings that can be possibly obtained by repeatedly performing the following operation zero or more times, modulo 998244353: * Choose an integer i such that 1\leq i\leq |S|-1 and the i-th and (i+1)-th characters in S are different. Replace each of the i-th and (i+1)-th characters in S with the character that differs from both of them (among `a`, `b` and `c`).
[{"input": "abc", "output": "3\n \n\n`abc`, `aaa` and `ccc` can be obtained.\n\n* * *"}, {"input": "abbac", "output": "65\n \n\n* * *"}, {"input": "babacabac", "output": "6310\n \n\n* * *"}, {"input": "ababacbcacbacacbcbbcbbacbaccacbacbacba", "output": "148010497"}]
Print the number of strings that can be possibly obtained by repeatedly performing the operation, modulo 998244353. * * *
s655846070
Accepted
p03392
Input is given from Standard Input in the following format: S
def main(): md = 998244353 s = input() n = len(s) al = True # allすべて同じ文字 an = 1 # any連続が存在すると0 for c0, c1 in zip(s, s[1:]): if c0 == c1: an = 0 else: al = False if an == 0 and not al: break if al: print(1) exit() if n == 2: print(2) exit() if n == 3: if s[0] == s[-1]: print(7) elif s[0] == s[1] or s[1] == s[2]: print(6) else: print(3) exit() # print(n) # print(an) ord0 = ord("a") r = sum(ord(c) - ord0 for c in s) % 3 if n % 3 == 0: d = pow(2, n // 3 - 1, md) if r == 0: an -= d * 2 else: an += d print((pow(3, n - 1, md) - pow(2, n - 1, md) + an) % md) main()
Statement You are given a string S consisting of `a`,`b` and `c`. Find the number of strings that can be possibly obtained by repeatedly performing the following operation zero or more times, modulo 998244353: * Choose an integer i such that 1\leq i\leq |S|-1 and the i-th and (i+1)-th characters in S are different. Replace each of the i-th and (i+1)-th characters in S with the character that differs from both of them (among `a`, `b` and `c`).
[{"input": "abc", "output": "3\n \n\n`abc`, `aaa` and `ccc` can be obtained.\n\n* * *"}, {"input": "abbac", "output": "65\n \n\n* * *"}, {"input": "babacabac", "output": "6310\n \n\n* * *"}, {"input": "ababacbcacbacacbcbbcbbacbaccacbacbacba", "output": "148010497"}]
Print the number of strings that can be possibly obtained by repeatedly performing the operation, modulo 998244353. * * *
s602802872
Runtime Error
p03392
Input is given from Standard Input in the following format: S
import sys S=int(input()) if len(S)==2: if S[0]==S[1]: print(1) else: print(2) sys.exit() flag1=0 flag2=0 for i in range(len(S)): if S[i] != S[0]: flag1 = 1 break for i in range(len(S)-1): if S[i+1] == S[i]: flag2 = 1 break c=0 for i in range(len(S)): if S[i]=='a': c+=1 elif S[i]=='b': c+=2 if flag1==0: print(1) sys.exit() L = len(S) dp = [[[[0] for i in range(3)] for j in range(3)] for k in range(L)] for a in range(3) dp[1][a][a]=1 for i in range(L): for p in range(3): for a in range(3) dp[i][p+(a+1)%3][(a+1)%3] += dp[i-1][p][a] dp[i][p+(a+2)%3][(a+2)%3] += dp[i-1][p][a] print(3**(len(S)-1) + dp[L][c%3][0] + dp[L][c%3][1]+ dp[L][c%3][2] + (1-flag2))
Statement You are given a string S consisting of `a`,`b` and `c`. Find the number of strings that can be possibly obtained by repeatedly performing the following operation zero or more times, modulo 998244353: * Choose an integer i such that 1\leq i\leq |S|-1 and the i-th and (i+1)-th characters in S are different. Replace each of the i-th and (i+1)-th characters in S with the character that differs from both of them (among `a`, `b` and `c`).
[{"input": "abc", "output": "3\n \n\n`abc`, `aaa` and `ccc` can be obtained.\n\n* * *"}, {"input": "abbac", "output": "65\n \n\n* * *"}, {"input": "babacabac", "output": "6310\n \n\n* * *"}, {"input": "ababacbcacbacacbcbbcbbacbaccacbacbacba", "output": "148010497"}]
Print the number of strings that can be possibly obtained by repeatedly performing the operation, modulo 998244353. * * *
s191645991
Wrong Answer
p03392
Input is given from Standard Input in the following format: S
s = list(input()) n = len(s) a = [0] * n MOD = 998244353 for i in range(n): a[i] = ord(s[i]) - ord("a") if max(a) == min(a): print(1) exit() elif n == 3: def solver(m): x = m // 100 y = (m % 100) // 10 z = m % 10 if x != y: c = (3 - x - y) % 3 temp = c * 110 + z if temp not in ans: ans.add(temp) solver(temp) if y != z: c = (3 - y - z) % 3 temp = x * 100 + c * 11 if temp not in ans: ans.add(temp) solver(temp) t = a[0] * 100 + a[1] * 10 + a[2] ans = set() ans.add(t) solver(t) print(len(ans)) exit() elif n == 2: print(2) exit() dp = [[0, 0, 0] for _ in range(3)] dp[0][0] = 1 dp[1][1] = 1 dp[2][2] = 1 for i in range(n - 1): T = [[0, 0, 0] for _ in range(3)] T[0][0] = dp[1][0] + dp[2][0] T[0][1] = dp[1][1] + dp[2][1] T[0][2] = dp[1][2] + dp[2][2] T[1][0] = dp[0][2] + dp[2][2] T[1][1] = dp[0][0] + dp[2][0] T[1][2] = dp[0][1] + dp[2][1] T[2][0] = dp[0][1] + dp[1][1] T[2][1] = dp[0][2] + dp[1][2] T[2][2] = dp[0][0] + dp[1][0] dp, T = T, dp m = sum(a) % 3 ans = 3 ** (n - 1) - (dp[0][m] + dp[1][m] + dp[2][m]) check = 1 for i in range(n - 1): if a[i] == a[i + 1]: check = 0 break ans += check print(dp, 2 ** (n - 1)) print(ans % MOD)
Statement You are given a string S consisting of `a`,`b` and `c`. Find the number of strings that can be possibly obtained by repeatedly performing the following operation zero or more times, modulo 998244353: * Choose an integer i such that 1\leq i\leq |S|-1 and the i-th and (i+1)-th characters in S are different. Replace each of the i-th and (i+1)-th characters in S with the character that differs from both of them (among `a`, `b` and `c`).
[{"input": "abc", "output": "3\n \n\n`abc`, `aaa` and `ccc` can be obtained.\n\n* * *"}, {"input": "abbac", "output": "65\n \n\n* * *"}, {"input": "babacabac", "output": "6310\n \n\n* * *"}, {"input": "ababacbcacbacacbcbbcbbacbaccacbacbacba", "output": "148010497"}]
Print `Alice` if Alice wins; print `Bob` if Bob wins. * * *
s208687890
Accepted
p03668
Input is given from Standard Input in the following format: N x_1 y_1 x_2 y_2 : x_{N-1} y_{N-1}
def main(): n = int(input()) ab = [list(map(int, input().split())) for _ in [0] * (n - 1)] g = [[] for _ in [0] * n] [g[a - 1].append(b - 1) for a, b in ab] [g[b - 1].append(a - 1) for a, b in ab] root = 0 # 根 d = [-1] * n # 根からの距離 d[root] = 0 q = [root] cnt = 0 while q: # BFS cnt += 1 qq = [] while q: i = q.pop() for j in g[i]: if d[j] == -1: d[j] = cnt qq.append(j) q = qq grundy = [0] * n dd = [j for i, j in sorted([(j, i) for i, j in enumerate(d)])[::-1]] for i in dd: dist = d[i] xorlist = [] xor = 0 for j in g[i]: if d[j] > dist: xorlist.append(grundy[j] + 1) for j in xorlist: xor ^= j grundy[i] = xor if grundy[0]: print("Alice") else: print("Bob") main()
Statement There is a tree with N vertices numbered 1, 2, ..., N. The edges of the tree are denoted by (x_i, y_i). On this tree, Alice and Bob play a game against each other. Starting from Alice, they alternately perform the following operation: * Select an existing edge and remove it from the tree, disconnecting it into two separate connected components. Then, remove the component that does not contain Vertex 1. A player loses the game when he/she is unable to perform the operation. Determine the winner of the game assuming that both players play optimally.
[{"input": "5\n 1 2\n 2 3\n 2 4\n 4 5", "output": "Alice\n \n\nIf Alice first removes the edge connecting Vertices 1 and 2, the tree becomes\na single vertex tree containing only Vertex 1. Since there is no edge anymore,\nBob cannot perform the operation and Alice wins.\n\n* * *"}, {"input": "5\n 1 2\n 2 3\n 1 4\n 4 5", "output": "Bob\n \n\n* * *"}, {"input": "6\n 1 2\n 2 4\n 5 1\n 6 3\n 3 2", "output": "Alice\n \n\n* * *"}, {"input": "7\n 1 2\n 3 7\n 4 6\n 2 3\n 2 4\n 1 5", "output": "Bob"}]
Print the number of ways to choose three of the sticks with different lengths that can form a triangle. * * *
s565261269
Accepted
p02583
Input is given from Standard Input in the following format: N L_1 L_2 \cdots L_N
x = int(input()) arr = list(map(int, input().split())) d = dict() for i in arr: if i in d: d[i] += 1 else: d[i] = 1 coun = 0 a = sorted(d.keys()) l = len(a) for i in range(l - 2): for j in range(i + 1, l - 1): k = j + 1 temp = a[i] + a[j] curr = d[a[i]] * d[a[j]] while k < l: if temp > a[k]: coun += curr * d[a[k]] k += 1 else: break print(coun)
Statement We have sticks numbered 1, \cdots, N. The length of Stick i (1 \leq i \leq N) is L_i. In how many ways can we choose three of the sticks with different lengths that can form a triangle? That is, find the number of triples of integers (i, j, k) (1 \leq i < j < k \leq N) that satisfy both of the following conditions: * L_i, L_j, and L_k are all different. * There exists a triangle whose sides have lengths L_i, L_j, and L_k.
[{"input": "5\n 4 4 9 7 5", "output": "5\n \n\nThe following five triples (i, j, k) satisfy the conditions: (1, 3, 4), (1, 4,\n5), (2, 3, 4), (2, 4, 5), and (3, 4, 5).\n\n* * *"}, {"input": "6\n 4 5 4 3 3 5", "output": "8\n \n\nWe have two sticks for each of the lengths 3, 4, and 5. To satisfy the first\ncondition, we have to choose one from each length.\n\nThere is a triangle whose sides have lengths 3, 4, and 5, so we have 2 ^ 3 = 8\ntriples (i, j, k) that satisfy the conditions.\n\n* * *"}, {"input": "10\n 9 4 6 1 9 6 10 6 6 8", "output": "39\n \n\n* * *"}, {"input": "2\n 1 1", "output": "0\n \n\nNo triple (i, j, k) satisfies 1 \\leq i < j < k \\leq N, so we should print 0."}]
Print the number of ways to choose three of the sticks with different lengths that can form a triangle. * * *
s243642472
Accepted
p02583
Input is given from Standard Input in the following format: N L_1 L_2 \cdots L_N
N = int(input()) nlist = list(map(int, input().split())) nnlist = sorted(nlist) kei = 0 l = 0 for i in range(l, N - 2): for j in range(i, N - 1): for k in range(j, N): if nnlist[i] != nnlist[j]: if nnlist[i] != nnlist[k]: if nnlist[j] != nnlist[k]: if nnlist[i] + nnlist[j] > nnlist[k]: kei = kei + 1 print(kei)
Statement We have sticks numbered 1, \cdots, N. The length of Stick i (1 \leq i \leq N) is L_i. In how many ways can we choose three of the sticks with different lengths that can form a triangle? That is, find the number of triples of integers (i, j, k) (1 \leq i < j < k \leq N) that satisfy both of the following conditions: * L_i, L_j, and L_k are all different. * There exists a triangle whose sides have lengths L_i, L_j, and L_k.
[{"input": "5\n 4 4 9 7 5", "output": "5\n \n\nThe following five triples (i, j, k) satisfy the conditions: (1, 3, 4), (1, 4,\n5), (2, 3, 4), (2, 4, 5), and (3, 4, 5).\n\n* * *"}, {"input": "6\n 4 5 4 3 3 5", "output": "8\n \n\nWe have two sticks for each of the lengths 3, 4, and 5. To satisfy the first\ncondition, we have to choose one from each length.\n\nThere is a triangle whose sides have lengths 3, 4, and 5, so we have 2 ^ 3 = 8\ntriples (i, j, k) that satisfy the conditions.\n\n* * *"}, {"input": "10\n 9 4 6 1 9 6 10 6 6 8", "output": "39\n \n\n* * *"}, {"input": "2\n 1 1", "output": "0\n \n\nNo triple (i, j, k) satisfies 1 \\leq i < j < k \\leq N, so we should print 0."}]
Print the number of ways to choose three of the sticks with different lengths that can form a triangle. * * *
s830374529
Accepted
p02583
Input is given from Standard Input in the following format: N L_1 L_2 \cdots L_N
# by the authority of GOD author: manhar singh sachdev # import os, sys from io import BytesIO, IOBase def main(): n = int(input()) l = list(map(int, input().split())) ans = 0 for i in range(n): for j in range(i + 1, n): for k in range(j + 1, n): if l[i] != l[j] and l[k] != l[j] and l[i] != l[k]: if 2 * max(l[i], l[j], l[k]) < l[i] + l[j] + l[k]: ans += 1 print(ans) # Fast IO Region BUFSIZE = 8192 class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd = file.fileno() self.buffer = BytesIO() self.writable = "x" in file.mode or "r" not in file.mode self.write = self.buffer.write if self.writable else None def read(self): while True: b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)) if not b: break ptr = self.buffer.tell() self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr) self.newlines = 0 return self.buffer.read() def readline(self): while self.newlines == 0: b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)) self.newlines = b.count(b"\n") + (not b) ptr = self.buffer.tell() self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr) self.newlines -= 1 return self.buffer.readline() def flush(self): if self.writable: os.write(self._fd, self.buffer.getvalue()) self.buffer.truncate(0), self.buffer.seek(0) class IOWrapper(IOBase): def __init__(self, file): self.buffer = FastIO(file) self.flush = self.buffer.flush self.writable = self.buffer.writable self.write = lambda s: self.buffer.write(s.encode("ascii")) self.read = lambda: self.buffer.read().decode("ascii") self.readline = lambda: self.buffer.readline().decode("ascii") sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout) input = lambda: sys.stdin.readline().rstrip("\r\n") if __name__ == "__main__": main()
Statement We have sticks numbered 1, \cdots, N. The length of Stick i (1 \leq i \leq N) is L_i. In how many ways can we choose three of the sticks with different lengths that can form a triangle? That is, find the number of triples of integers (i, j, k) (1 \leq i < j < k \leq N) that satisfy both of the following conditions: * L_i, L_j, and L_k are all different. * There exists a triangle whose sides have lengths L_i, L_j, and L_k.
[{"input": "5\n 4 4 9 7 5", "output": "5\n \n\nThe following five triples (i, j, k) satisfy the conditions: (1, 3, 4), (1, 4,\n5), (2, 3, 4), (2, 4, 5), and (3, 4, 5).\n\n* * *"}, {"input": "6\n 4 5 4 3 3 5", "output": "8\n \n\nWe have two sticks for each of the lengths 3, 4, and 5. To satisfy the first\ncondition, we have to choose one from each length.\n\nThere is a triangle whose sides have lengths 3, 4, and 5, so we have 2 ^ 3 = 8\ntriples (i, j, k) that satisfy the conditions.\n\n* * *"}, {"input": "10\n 9 4 6 1 9 6 10 6 6 8", "output": "39\n \n\n* * *"}, {"input": "2\n 1 1", "output": "0\n \n\nNo triple (i, j, k) satisfies 1 \\leq i < j < k \\leq N, so we should print 0."}]
Print the number of ways to choose three of the sticks with different lengths that can form a triangle. * * *
s836187218
Accepted
p02583
Input is given from Standard Input in the following format: N L_1 L_2 \cdots L_N
n=int(input()) l=[int(i) for i in input().split()] cou=0 for i in range(n): for j in range(i+1,n): for k in range(j+1,n): if l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i]: a=max(l[i],l[j],l[k]) if a<l[i]+l[j]+l[k]-a: cou+=1 print(cou)
Statement We have sticks numbered 1, \cdots, N. The length of Stick i (1 \leq i \leq N) is L_i. In how many ways can we choose three of the sticks with different lengths that can form a triangle? That is, find the number of triples of integers (i, j, k) (1 \leq i < j < k \leq N) that satisfy both of the following conditions: * L_i, L_j, and L_k are all different. * There exists a triangle whose sides have lengths L_i, L_j, and L_k.
[{"input": "5\n 4 4 9 7 5", "output": "5\n \n\nThe following five triples (i, j, k) satisfy the conditions: (1, 3, 4), (1, 4,\n5), (2, 3, 4), (2, 4, 5), and (3, 4, 5).\n\n* * *"}, {"input": "6\n 4 5 4 3 3 5", "output": "8\n \n\nWe have two sticks for each of the lengths 3, 4, and 5. To satisfy the first\ncondition, we have to choose one from each length.\n\nThere is a triangle whose sides have lengths 3, 4, and 5, so we have 2 ^ 3 = 8\ntriples (i, j, k) that satisfy the conditions.\n\n* * *"}, {"input": "10\n 9 4 6 1 9 6 10 6 6 8", "output": "39\n \n\n* * *"}, {"input": "2\n 1 1", "output": "0\n \n\nNo triple (i, j, k) satisfies 1 \\leq i < j < k \\leq N, so we should print 0."}]
For each dataset, print the converted texts in a line.
s442201089
Accepted
p00101
The input consists of several datasets. There will be the number of datasets _n_ in the first line. There will be _n_ lines. A line consisting of english texts will be given for each dataset.
# N,M,L = list(map(int, input().split())) N = int(input()) L = [] for i in range(N): L.append(input()) def calc(s): s_len = len(s) flag = 0 check = "Hoshino" hoshino_len = len(check) F = list(s) for i in range(s_len - hoshino_len + 1): flag = 0 if F[i] == "H": flag = 1 for j in range(hoshino_len): if F[i + j] != check[j]: flag = 0 break if flag == 1: F[i + 6] = "a" F2 = "".join(F) print(F2) for i in range(N): calc(L[i])
Aizu PR 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 "Hoshino" not "Hoshina". Your task is to write a program which replace all the words "Hoshino" with "Hoshina". You can assume that the number of characters in a text is less than or equal to 1000.
[{"input": "Hoshino\n Hashino\n Masayuki Hoshino was the grandson of Ieyasu Tokugawa.", "output": "Hoshina\n Hashino\n Masayuki Hoshina was the grandson of Ieyasu Tokugawa."}]
For each dataset, print the converted texts in a line.
s508078255
Wrong Answer
p00101
The input consists of several datasets. There will be the number of datasets _n_ in the first line. There will be _n_ lines. A line consisting of english texts will be given for each dataset.
n = int(input()) for i in range(n): lst = input().split() ans = [] for s in lst: if s.count("Hoshin"): ans.append("Hoshina") else: ans.append(s) # print(ans) for s in ans: if s == ans[-1]: print(s) else: print(s, end=" ")
Aizu PR 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 "Hoshino" not "Hoshina". Your task is to write a program which replace all the words "Hoshino" with "Hoshina". You can assume that the number of characters in a text is less than or equal to 1000.
[{"input": "Hoshino\n Hashino\n Masayuki Hoshino was the grandson of Ieyasu Tokugawa.", "output": "Hoshina\n Hashino\n Masayuki Hoshina was the grandson of Ieyasu Tokugawa."}]
For each dataset, print the converted texts in a line.
s061079019
Accepted
p00101
The input consists of several datasets. There will be the number of datasets _n_ in the first line. There will be _n_ lines. A line consisting of english texts will be given for each dataset.
for _ in range(int(input())): # 標準入力から何個英文があるか取得する str1 = input() # 英文を標準入力する print(str1.replace("Hoshino", "Hoshina")) # "Hoshino"を"Hoshina"にする
Aizu PR 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 "Hoshino" not "Hoshina". Your task is to write a program which replace all the words "Hoshino" with "Hoshina". You can assume that the number of characters in a text is less than or equal to 1000.
[{"input": "Hoshino\n Hashino\n Masayuki Hoshino was the grandson of Ieyasu Tokugawa.", "output": "Hoshina\n Hashino\n Masayuki Hoshina was the grandson of Ieyasu Tokugawa."}]
For each dataset, print the converted texts in a line.
s731123520
Accepted
p00101
The input consists of several datasets. There will be the number of datasets _n_ in the first line. There will be _n_ lines. A line consisting of english texts will be given for each dataset.
input() try: while True: str = input() print(str.replace("Hoshino", "Hoshina")) except EOFError: pass
Aizu PR 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 "Hoshino" not "Hoshina". Your task is to write a program which replace all the words "Hoshino" with "Hoshina". You can assume that the number of characters in a text is less than or equal to 1000.
[{"input": "Hoshino\n Hashino\n Masayuki Hoshino was the grandson of Ieyasu Tokugawa.", "output": "Hoshina\n Hashino\n Masayuki Hoshina was the grandson of Ieyasu Tokugawa."}]
For each dataset, print the converted texts in a line.
s151920376
Wrong Answer
p00101
The input consists of several datasets. There will be the number of datasets _n_ in the first line. There will be _n_ lines. A line consisting of english texts will be given for each dataset.
for _ in range(int(input())): s = input() if "Hoshino" in s: l = s.split() for i in range(len(l)): if "Hoshino" == l[i]: l[i] = "Hoshina" s = " ".join(l) print(s)
Aizu PR 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 "Hoshino" not "Hoshina". Your task is to write a program which replace all the words "Hoshino" with "Hoshina". You can assume that the number of characters in a text is less than or equal to 1000.
[{"input": "Hoshino\n Hashino\n Masayuki Hoshino was the grandson of Ieyasu Tokugawa.", "output": "Hoshina\n Hashino\n Masayuki Hoshina was the grandson of Ieyasu Tokugawa."}]
For each dataset, print the converted texts in a line.
s298377818
Wrong Answer
p00101
The input consists of several datasets. There will be the number of datasets _n_ in the first line. There will be _n_ lines. A line consisting of english texts will be given for each dataset.
n = int(input()) sentences = [str(input()) for i in range(n)] for sentence in sentences: sentence = sentence.split(" ") for word in range(len(sentence)): if sentence[word] == "Hoshino": sentence[word] = "Hoshina" print(" ".join(sentence))
Aizu PR 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 "Hoshino" not "Hoshina". Your task is to write a program which replace all the words "Hoshino" with "Hoshina". You can assume that the number of characters in a text is less than or equal to 1000.
[{"input": "Hoshino\n Hashino\n Masayuki Hoshino was the grandson of Ieyasu Tokugawa.", "output": "Hoshina\n Hashino\n Masayuki Hoshina was the grandson of Ieyasu Tokugawa."}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s536398940
Wrong Answer
p02995
Input is given from Standard Input in the following format: A B C D
A, B, C, D = map(int, input().split()) a = (B // C) - (A // C) b = (B // D) - (A // D) c = (B // (C + D)) - (A // (C + D)) print(B - A - a - b + c)
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s384688457
Accepted
p02995
Input is given from Standard Input in the following format: A B C D
A, B, C, D = map(int, input().split()) # 最大公約数を求める ans = 0 tmp1, tmp2 = C, D while 1: if tmp1 % tmp2 == 0: ans = tmp2 break else: tmp = tmp1 % tmp2 tmp1 = tmp2 tmp2 = tmp ans = int(C * D / ans) # print(ans) num1 = B // C num2 = (A - 1) // C num_C = num1 - num2 num1 = B // D num2 = (A - 1) // D num_D = num1 - num2 num1 = B // ans num2 = (A - 1) // ans num_CD = num1 - num2 print(B - A + 1 - num_C - num_D + num_CD)
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s986359362
Wrong Answer
p02995
Input is given from Standard Input in the following format: A B C D
A, B, C, D = list(map(int, input().split())) a1 = (A - 1) // C a2 = (A - 1) // D a3 = (A - 1) // (C * D) a = (A - 1) - (a1 + a2 - a3) b1 = B // C b2 = B // D b3 = B // (C * D) b = B - (b1 + b2 - b3) print(b - a)
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s613748920
Wrong Answer
p02995
Input is given from Standard Input in the following format: A B C D
# input left, right, fizz, buzz = map(int, input().split()) # define nums = right - left + 1 fizzbuzz = fizz * buzz # main if left % fizz == 0: fizz_nums = right // fizz - left // fizz + 1 else: fizz_nums = right // fizz - (left // fizz + 1) + 1 if left % buzz == 0: buzz_nums = right // buzz - left // buzz + 1 else: buzz_nums = right // buzz - (left // buzz + 1) + 1 if left % fizzbuzz == 0: fizzbuzz_nums = right // fizzbuzz - left // fizzbuzz + 1 else: fizzbuzz_nums = right // fizzbuzz - (left // fizzbuzz + 1) + 1 # output print(nums - (fizz_nums + buzz_nums - fizzbuzz_nums)) # debug """ debug = int(input()) if debug == (nums - (fizz_nums + buzz_nums - fizzbuzz_nums)): print("AC") else: print("WA") """
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s879717869
Wrong Answer
p02995
Input is given from Standard Input in the following format: A B C D
import math def gcd(m, n): while n: m, n = n, m % n return m A, B, C, D = map( int, input().split() ) # A以上B以下の整数のうち、CでもDでも割り切れないものの個数 CD_lcm = (C * D) / gcd(C, D) # B以下の全ての数でCで割れるものの個数hoge hogeBC = math.floor(B / C) # A-1以下の全ての数でCで割れるものの個数fuga fugaA1C = math.floor((A - 1) / C) # B以下の全ての数でDで割れるものの個数 piyoBD = math.floor(B / D) # A-1以下の全ての数でDで割れるものの個数 toriA1D = math.floor((A - 1) / D) # B以下の全ての数でCとDの最小公倍数で割れるものの個数 yoshiBCD = math.floor(B / (CD_lcm)) # A-1以下の全ての数でCとDの最小公倍数で割れるものの個数 takaA1CD = math.floor((A - 1) / (CD_lcm)) # A以上B以下の整数でCで割り切れるものの個数 Ccan = hogeBC - fugaA1C # A以上B以下の整数でDで割り切れるものの個数 Dcan = piyoBD - toriA1D # A以上B以下の整数でCでもDでも割り切れるものの個数 CDcan = yoshiBCD - takaA1CD # A以上B以下でCでもDでも割り切れるものの個数 count = Ccan + Dcan - CDcan print(B - (A - 1) - count)
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s415473759
Runtime Error
p02995
Input is given from Standard Input in the following format: A B C D
def s0(): return input() def s1(): return input().split() def s2(n): return [input() for x in range(n)] def s3(n): return [input().split() for _ in range(n)] def s4(n): return [[x for x in s] for s in s2(n)] def n0(): return int(input()) def n1(): return [int(x) for x in input().split()] def n2(n): return [int(input()) for _ in range(n)] def n3(n): return [[int(x) for x in input().split()] for _ in range(n)] def t3(n): return [tuple(int(x) for x in input().split()) for _ in range(n)] def p0(b, yes="Yes", no="No"): print(yes if b else no) # from sys import setrecursionlimit # setrecursionlimit(1000000) # from collections import Counter,deque,defaultdict # import itertools # import math # import networkx # from bisect import bisect_left,bisect_right # from heapq import heapify,heappush,heappop # from fractions import gcd from math import gcd def lcm(x, y): return (x * y) // gcd(x, y) a, b, c, d = n1() a1 = b // c a2 = (a - 1) // c b1 = b // d b2 = (a - 1) // d l = lcm(c, d) c1 = b // l c2 = (a - 1) // l ans = a1 - a2 + b1 - b2 - c1 + c2 print(b - a + 1 - ans)
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s974863973
Wrong Answer
p02995
Input is given from Standard Input in the following format: A B C D
def main2(): a, b, c, d = list(map(int, input().split())) sss = b // c - (a - 1) // c ssss = b // d - (a - 1) // d di = 0 for i in range(d, b, d): if i % c == 0: di = i break sssss = b // di - (a - 1) // di if di != 0 else 0 print((b - a + 1) - (sss + ssss - sssss)) if __name__ == "__main__": main2()
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s007541389
Wrong Answer
p02995
Input is given from Standard Input in the following format: A B C D
a, b, c, d = map(int, input().split()) cd = c * d n_c = 0 n_d = 0 n_cd = 0 i = (a / c + 1) * c while i <= b: n_c += 1 i *= c i = (a / d + 1) * d while i <= b: n_d += 1 i *= c i = (a / cd + 1) * cd while i <= b: n_cd += 1 i *= cd print(b - a + 1 + n_c + n_d - n_cd)
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s361130398
Wrong Answer
p02995
Input is given from Standard Input in the following format: A B C D
lista = input().split(" ") a, b, c, d = lista a = int(a) b = int(b) c = int(c) d = int(d) p1 = 1 p2 = 0 p3 = 0 p4 = 0 # minc a1 = a a2 = a b1 = b b2 = b while a1 <= b: if a1 % c == 0: p1 = a1 break a1 += 1 # maxc while b1 >= a: if b1 % c == 0: p3 = b1 break b1 -= 1 # mind while a2 <= b: if a2 % d == 0: p2 = a2 break a2 += 1 # maxd while b2 >= a: if b2 % d == 0: p4 = b2 break b2 -= 1 mc = (p3 - p1) / c md = (p4 - p2) / d print((b - a) - int(md + mc))
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s815278071
Accepted
p02995
Input is given from Standard Input in the following format: A B C D
# !/usr/bin/env python3 # encoding: UTF-8 # Modified: <22/Jun/2019 05:52:43 PM> # ✪ H4WK3yE乡 # Mohd. Farhan Tahir # Indian Institute Of Information Technology (IIIT), Gwalior import sys import os from io import IOBase, BytesIO def main(): a, b, c, d = get_ints() l = 0 if a % c == 0: l = a else: l = (a // c) * c + c r = (b // c) * c n1 = (r - l) // c + 1 if a % d == 0: l = a else: l = (a // d) * d + d r = (b // d) * d n2 = (r - l) // d + 1 from fractions import gcd g = (c * d) // gcd(c, d) if a % g == 0: l = a else: l = (a // g) * g + g r = (b // g) * g n3 = (r - l) // g + 1 print(b - a + 1 - (n1 + n2 - n3)) BUFSIZE = 8192 class FastIO(BytesIO): newlines = 0 def __init__(self, file): self._file = file self._fd = file.fileno() self.writable = "x" in file.mode or "w" in file.mode self.write = super(FastIO, self).write if self.writable else None def _fill(self): s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)) self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0]) return s def read(self): while self._fill(): pass return super(FastIO, self).read() def readline(self): while self.newlines == 0: s = self._fill() self.newlines = s.count(b"\n") + (not s) self.newlines -= 1 return super(FastIO, self).readline() def flush(self): if self.writable: os.write(self._fd, self.getvalue()) self.truncate(0), self.seek(0) class IOWrapper(IOBase): def __init__(self, file): py2 = round(0.5) self.buffer = FastIO(file) self.flush = self.buffer.flush self.writable = self.buffer.writable if py2 == 1: self.write = self.buffer.write self.read = self.buffer.read self.readline = self.buffer.readline else: self.write = lambda s: self.buffer.write(s.encode("ascii")) self.read = lambda: self.buffer.read().decode("ascii") self.readline = lambda: self.buffer.readline().decode("ascii") sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout) def get_array(): return list(map(int, sys.stdin.readline().split())) def get_ints(): return map(int, sys.stdin.readline().split()) def input(): return sys.stdin.readline().strip() if __name__ == "__main__": main()
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s575711577
Wrong Answer
p02995
Input is given from Standard Input in the following format: A B C D
import fractions a, b, c, d = map(int, input().split()) yoso = b - a + 1 kobai = fractions.gcd(c, d) AC = c - (a % c) if AC == c: AC = 0 BC = b % c AD = d - (a % d) if AD == d: AD = 0 BD = b % d Akobai = a % kobai if Akobai == kobai: Akobai = 0 Bkobai = b % kobai C = 0 if AC + BC >= (yoso % c): C = yoso // c else: C = (yoso // c) + 1 D = 0 if AD + BD >= (yoso % d): D = yoso // d else: D = (yoso // d) + 1 CD = 0 if Akobai + Bkobai >= (yoso % kobai): CD = yoso // kobai else: CD = (yoso // kobai) + 1 print(yoso + CD - C - D)
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s349291827
Accepted
p02995
Input is given from Standard Input in the following format: A B C D
import fractions class AntiDivision: def __init__(self): self.A, self.B, self.C, self.D = map(int, input().split()) def cal(self): a_b_count = self.B - self.A + 1 lcm = (self.C * self.D) // fractions.gcd(self.C, self.D) c_count = self.B // self.C - (self.A - 1) // self.C d_count = self.B // self.D - (self.A - 1) // self.D lcm_count = self.B // lcm - (self.A - 1) // lcm print(a_b_count - c_count - d_count + lcm_count) antiDivision = AntiDivision() antiDivision.cal()
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s833117629
Accepted
p02995
Input is given from Standard Input in the following format: A B C D
import io import sys from fractions import gcd def IN_S(): return input() def IN_I(): return int(input()) def IN_L_I(): return list(map(int, input().split())) def IN_L_S(): return list(map(str, input().split())) def STR_SPLIT(s, n): for l in range(0, len(s), n): yield s[0 + l : n + l] def T_IN(): global test_str sys.stdin = io.StringIO(test_str[1:-1]) test_str = """ 314159265358979323 846264338327950288 419716939 937510582 """ def MAIN(): # T_IN() A() def A(): a, b, c, d = IN_L_I() divc = (b // c) - ((a - 1) // c) divd = (b // d) - ((a - 1) // d) cd = c * d // gcd(c, d) divcd = (b // cd) - ((a - 1) // cd) total = (b + 1 - a) - divc - divd + divcd print(total) return None def B(): return None def C(): return None MAIN()
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D. * * *
s928954372
Wrong Answer
p02995
Input is given from Standard Input in the following format: A B C D
import fractions parents = list(map(int, input().split(" "))) All = parents[1] - parents[0] min_2 = (parents[2] * parents[3]) // fractions.gcd(parents[2], parents[3]) All = All - All // parents[2] - All // parents[3] + All // min_2 if ( parents[2] >= parents[0] and parents[2] <= parents[1] and parents[2] > (parents[1] - parents[0]) ): All = All - 1 if ( parents[3] >= parents[0] and parents[3] <= parents[1] and parents[3] > (parents[1] - parents[0]) ): All = All - 1 if All < 0: All = 0 print(All)
Statement You are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.
[{"input": "4 9 2 3", "output": "2\n \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]
Print `Yes` if the string `CF` can be obtained from the string s by deleting some characters. Otherwise print `No`. * * *
s807479065
Runtime Error
p03957
The input is given from Standard Input in the following format: s
s = input() n = len(s) f = 0 for i in range(s): if s[i] == 'C' and f = 0: f += 1 if s[i] == 'F' and f = 1: print("Yes") exit() print("No")
Statement This contest is `CODEFESTIVAL`, which can be shortened to the string `CF` by deleting some characters. Mr. Takahashi, full of curiosity, wondered if he could obtain `CF` from other strings in the same way. You are given a string s consisting of uppercase English letters. Determine whether the string `CF` can be obtained from the string s by deleting some characters.
[{"input": "CODEFESTIVAL", "output": "Yes\n \n\n`CF` is obtained by deleting characters other than the first character `C` and\nthe fifth character `F`.\n\n* * *"}, {"input": "FESTIVALCODE", "output": "No\n \n\n`FC` can be obtained but `CF` cannot be obtained because you cannot change the\norder of the characters.\n\n* * *"}, {"input": "CF", "output": "Yes\n \n\nIt is also possible not to delete any characters.\n\n* * *"}, {"input": "FCF", "output": "Yes\n \n\n`CF` is obtained by deleting the first character."}]
Print `Yes` if the string `CF` can be obtained from the string s by deleting some characters. Otherwise print `No`. * * *
s376553748
Wrong Answer
p03957
The input is given from Standard Input in the following format: s
s = set(input()) print("Yes" if "C" in s and "F" in s else "No")
Statement This contest is `CODEFESTIVAL`, which can be shortened to the string `CF` by deleting some characters. Mr. Takahashi, full of curiosity, wondered if he could obtain `CF` from other strings in the same way. You are given a string s consisting of uppercase English letters. Determine whether the string `CF` can be obtained from the string s by deleting some characters.
[{"input": "CODEFESTIVAL", "output": "Yes\n \n\n`CF` is obtained by deleting characters other than the first character `C` and\nthe fifth character `F`.\n\n* * *"}, {"input": "FESTIVALCODE", "output": "No\n \n\n`FC` can be obtained but `CF` cannot be obtained because you cannot change the\norder of the characters.\n\n* * *"}, {"input": "CF", "output": "Yes\n \n\nIt is also possible not to delete any characters.\n\n* * *"}, {"input": "FCF", "output": "Yes\n \n\n`CF` is obtained by deleting the first character."}]
Print `Yes` if the string `CF` can be obtained from the string s by deleting some characters. Otherwise print `No`. * * *
s721414946
Wrong Answer
p03957
The input is given from Standard Input in the following format: s
print("No")
Statement This contest is `CODEFESTIVAL`, which can be shortened to the string `CF` by deleting some characters. Mr. Takahashi, full of curiosity, wondered if he could obtain `CF` from other strings in the same way. You are given a string s consisting of uppercase English letters. Determine whether the string `CF` can be obtained from the string s by deleting some characters.
[{"input": "CODEFESTIVAL", "output": "Yes\n \n\n`CF` is obtained by deleting characters other than the first character `C` and\nthe fifth character `F`.\n\n* * *"}, {"input": "FESTIVALCODE", "output": "No\n \n\n`FC` can be obtained but `CF` cannot be obtained because you cannot change the\norder of the characters.\n\n* * *"}, {"input": "CF", "output": "Yes\n \n\nIt is also possible not to delete any characters.\n\n* * *"}, {"input": "FCF", "output": "Yes\n \n\n`CF` is obtained by deleting the first character."}]