submission_id
string
problem_id
string
status
string
code
string
input
string
output
string
problem_description
string
s564037552
p04043
Runtime Error
n, l = map(int, input().split()) a = [input() for _ in range(n)] a.sort() print ("".join(a))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s395440249
p04043
Runtime Error
S=input() a, b, c = (int(i) for i in S.split()) d=(a+b+c)/17 e=(max(a,b)-2+max(a,c)+max(b,c))/17 if(d==1 and e==1): print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s941187873
p04043
Runtime Error
a, b, c = (int(i) for i in input().split()) d=(a+b+c)/17 e=(max(a,b)-2+max(a,c)+max(b,c))/17 if(d==1 and e==1): print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s156092197
p04043
Runtime Error
a, b, c = (int(i) for i in input().split()) d=(a+b+c)/17 e=(max(a,b)-2+max(a,c)+max(b,c))/17 if(d==1 and e==1): print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s465350263
p04043
Runtime Error
a, b, c = (int(i) for i in input().split()) d=(a+b+c)/17 e=(max(a,b)-2+max(a,c)+max(b,c))/21 if(d==1 and e==1) print(min(a,b,c), max(a,b,c), min(a,b,c))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s772840587
p04043
Runtime Error
a=list(map(int,input.split())) if a.sort==[5,5,7]: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s126834868
p04043
Runtime Error
N,L=map(int,input().split()) S=[input() for i in range(N)] print(''.join(S.sort()))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s322245416
p04043
Runtime Error
A,B,C = [int(i) for i in input().split()] list = [A,B,C] for i in list: if i == 5: go += 1 if i == 7: nana += 1 if go == 2 and nana == 1: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s820786028
p04043
Runtime Error
#Iroha Loves Strings (ABC Edition) N, L = map(int, input().split()) S = [] for _ in range(N): S.append(input()) sort = sorted(S) R = "" for i in range(0,N): R = R + sort[i] print(R)
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s672964822
p04043
Runtime Error
#Iroha Loves Strings (ABC Edition) N, L = map(int, input().split()) S = [] for _ in range(N): S.append(input()) R = [] K = "" R.append(S[0]) for i in range(1, N): for j in range (0, i): if S[i] < R[j]: R.insert(j,S[i]) if S[i] >= R[i-1]: R.append(S[i]) for i in range(0,N): K = K + R[i] print(K)
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s367004399
p04043
Runtime Error
x,y,z = map(int,input().split()) if(x=5): if(y=5): if(z=7): print("YES") else: print("NO") elif(y=7): if(z=5): print("YES") else: print("NO") elif(x=7): if(y=5): if(z=5): print("YES") else: print("NO") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s941333719
p04043
Runtime Error
x,y,z = map(int,input().split()) if(x=5 and y=7 and z=5): print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s734514159
p04043
Runtime Error
ns,k = input().split() nlist = input().split() nslist = list(ns) while set(nslist) & set(nlist): ns = int(ns)+1 ns = str(ns) nslist = list(ns) print(ns)
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s571327326
p04043
Runtime Error
S = "".join(list(map(str,input().split()))) if S.count("5") == 2 and S.count("7") == 1: print("YES") else: print("NO)
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s651309871
p04043
Runtime Error
line=input().split() N=int(line[0]) K=int(line[1]) D=input().rstrip().split() for i in range(N,10*N+1): s=str(i) flag=True for x in D: if x in s: flag=False break if flag: print(s) break else: continue
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s999253863
p04043
Runtime Error
ef main(): HAIKU = [5, 7, 5] v = list(map(int, input().split())) return equal_list(v, HAIKU) def equal_list(lst1, lst2): lst = lst1.copy() for element in lst2: try: lst.remove(element) except ValueError: break else: if not lst: return "YES" return "NO" if __name__ == "__main__": print(main())
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s514171736
p04043
Runtime Error
a, b, c = map(int, input().split()) if (a == 7 and b ==5 and c == 5)or(a == 5 and b == 7 and c == 5) or(a==5 and b==5 and c==7): print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s147325845
p04043
Runtime Error
a, b, c = map(int, input().split()) # まず長さが7の文節があるか確認 if (a == 7 and b ==5 and c == 5)or(a == 5 and b == 7 and c == 5) or(a==5 and b==5 and c==7): print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s769675168
p04043
Runtime Error
a, b, c = map(int, input().split()) # まず長さが7の文節があるか確認 if (a == 7 b == 5 c == 5)or(a == 5 b == 7 c == 5)or(a==5 b==5 c==7): print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s294438099
p04043
Runtime Error
a,b,c = map(int,input().split()) if a=5 b=5 c=7 or a=5 b=7 c=5 or a=7 b=5 c=5: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s894508339
p04043
Runtime Error
n,l = map(int,input().split()) S = sorted([input() for _ in range(n)]) print(*S,sep="")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s097820786
p04043
Runtime Error
#include <iostream> #include <algorithm> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { vector<int> a(3); rep(i,3){ cin >> a[i]; } sort(a.begin(),a.end()); if (a[0]!=5){ cout << "NO" << endl; exit(0); } if (a[1]!=5){ cout << "NO" << endl; exit(0); } if (a[2]!=7){ cout << "NO" << endl; exit(0); } cout << "YES"; return 0; }
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s740260442
p04043
Runtime Error
n, k = map(int, input().split()) d = set(map(str, input().split())) for i in range(n, 10*n): if len(d & set(str(i))) == 0: print(i) break
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s936326067
p04043
Runtime Error
ls=list(map(int,input().split())) ls1=[[5,7,5],[5,5,7],[7,5,5]] if ls in ls1: print('YES') else: print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s002200038
p04043
Runtime Error
ls=list(map(int,input().split())) A=ls[0] B=ls[1] C=ls[2] if (A==B==5 and C=7) or (A==C==5 and B==5) or (A==7 or B==C==5): print('YES') else: print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s015474069
p04043
Runtime Error
arr_len_int = int(input().split(' ')[1]) a = [input() for i in range(arr_len_int)] a.sort() b = set(a) print(''.join(b ))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s787875569
p04043
Runtime Error
val, size = map(int, input().split()) disabledList = [int(x) for x in input().split()] # number enableList = list(set(range(10)) - set(disabledList)) # number resultList = [] # str, must reverse isTenOver = False for char in reversed(list(str(val))): targetInt = int(char) if isTenOver: targetInt += 1 if targetInt in enableList: isTenOver = False resultList.append(str(targetInt)) continue resultList = [str(min(enableList))] * len(resultList) if targetInt > max(enableList): isTenOver = True resultList.append(str(min(enableList))) else: isTenOver = False minNum = min(filter(lambda x:x > targetInt, enableList)) resultList.append(str(minNum)) if isTenOver: minNum = min(filter(lambda x:x > 0, enableList)) resultList.append(str(minNum)) print(''.join(reversed(resultList)))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s742533069
p04043
Runtime Error
A,B,C=map(int(input())) if A=5 or B=5 or C=7: print('Yes') elif A=5 or B=7 or C=5: print('Yes') elif A=7 or B=5 or C=5: print('Yes') else: print('No')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s037578885
p04043
Runtime Error
l = [int(i) for i in range(input().split()] print('YES') if l.count(5) == 2 and l.count(7) == 1 else print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s044450188
p04043
Runtime Error
a = list(map(int, input().split())) count = 0 count1 = 0 for i in range(3): if a[i] == 5: count++ elif a[i] == 7: count1++ if count == 2 & count1 == 1: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s418422594
p04043
Runtime Error
if A==5 and B==5 and C==7: print('Yes') elif A==5 and B==7 and C==5: print('Yes') elif A==7 and B==5 and C==5: print('Yes') else: print('No')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s965482600
p04043
Runtime Error
a = int(input().split()) if a[0] + a[1] + a[2] == 17: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s023396572
p04043
Runtime Error
A, B, C = int(input().split()) if A == 7, B == 5, C == 5: print("YES") elif A == 5, B == 7, C == 5: print("YES") elif A == 5, B == 5, C == 7: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s227794200
p04043
Runtime Error
A, B, C = input().split() if A == 7, B == 5, C == 5: print("YES") elif A == 5, B == 7, C == 5: print("YES") elif A == 5, B == 5, C == 7: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s195645521
p04043
Runtime Error
A, B, C = int(map(input().split())) if A + B + C == 17: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s228507235
p04043
Runtime Error
A, B, C = int(input().split()) if A + B + C == 17: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s264952351
p04043
Runtime Error
A, B, C = int(input()) print('YES' if A, B, C == 5 7 5 else 'NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s882048241
p04043
Runtime Error
A = input() B = input() C = input() D = A + B + C if(D<=12): if (A == 7): if(B == 5): print('YES') if (B == 7): if(A == 5): print('YES') if (C == 7): if(A == 5): print('YES') else: print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s313330765
p04043
Runtime Error
a = list(map(int,input().split())) a.sort() ans = True if a[0] != 5: ans = False if a[1] != 5: ans = False if a[2] != 7: ans = False if(ans): print("Yes") else: print("No")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s953594122
p04043
Runtime Error
A,B,C=map(int,input().split()) if A*B*C == 5*5*7 print('YES') else: print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s307188499
p04043
Runtime Error
A,B,C=map(int,input().split) if A+B+C == 17: print('YES') else: print('NO)
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s770683395
p04043
Runtime Error
a,b,c=map(int,input().split()) if a*b*c==5*5*7 print("YES") else print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s679961228
p04043
Runtime Error
input_line=input().rstrip().split(" ") five=int(input_line.count("5")) seven=int(input_line.count("7")) if five=2 and seven=1: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s881821989
p04043
Runtime Error
input_line=input().rstrip().split(" ") a=int(input_line[0]) b=int(input_line[1]) c=int(input_line[2]) if a+b+c!=17: print("NO") elif (a==b==5 or a==c==5 or b==C==5) and a+b+c==17: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s690050360
p04043
Runtime Error
input_line=input().rstrip().split(" ") a=int(input_line[0]) b=int(input_line[1]) c=int(input_line[2]) if a==b==5 or a==c==5 or b==C==5: if a+b+c==17: print("YES") elif a+b+c!=17: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s304623271
p04043
Runtime Error
input_line=input().rstrip().split(" ") a=int(input_line[0]) b=int(input_line[1]) c=int(input_line[2]) if a==b==5 or a==c==5 or b==C==5: if a+b+c==17: print("YES") elif a+b+c!=17 print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s851456707
p04043
Runtime Error
input_line=input().rstrip().split(" ") a=int(input_line[0]) b=int(input_line[1]) c=int(input_line[2]) if a==b==5 or a==c==5 or b==C==5: if a+b+c==17: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s943476510
p04043
Runtime Error
input_line=input().rstrip().split(" ") a=int(input_line[0]) b=int(input_line[1]) c=int(input_line[2]) if a==b==5 or a==c==5 or b==C==5: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s152592948
p04043
Runtime Error
input_line=input().rstrip().split(" ") a=int(input_line[0]) b=int(input_line[1]) c=int(input_line[2]) if a+b+c!=17: print("NO") elif a==b==5 or a==c==5 or b==C==5: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s774824949
p04043
Runtime Error
s = input().rstrip().split(' ') counta = 0 countb = 0 for i in range(len(s)): if int(s[i]) == 7: counta += 1 elif int(s[i]) == 5: countb += 1 if counta == 1 and countb == 2: print('YES') else: print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s512163030
p04043
Runtime Error
abc=[int(i) for i in input().split()] num_five=0 num_seven=0 for i in range(3): if abc[i]==5: num_five+=1 elif abc[i]==7: num_five+=1 if num_five==2 and num_seven==1: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s321149049
p04043
Runtime Error
def check_a(numbers): if numbers.count(5) == 2 and numbers.count(7) == 1: return 'YES' else: return 'NO' def main(): numbers = list(map(int, input())) print(check_a(numbers=numbers)) if __name__ == '__main__': main()
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s624463873
p04043
Runtime Error
List=[int(i) for i in input().split()] if List.count(5) == 2 and List.cout(7) == 1: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s063174189
p04043
Runtime Error
n,l=map(int,input().split()) s=sorted([input() for i in range(n)]) print(*s,sep="")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s697918891
p04043
Runtime Error
n, l = map(int, input().split()) s = [] for _ in range(n): s.append(input()) s = sorted(s) print(*s, sep="")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s135020914
p04043
Runtime Error
n, l = map(int, input().split()) s = [] for _ in range(n): s.append(input()) s = sorted(s) r = "" for i in s: r += i print(r)
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s726296767
p04043
Runtime Error
a,b,c = list(map(int,input().split())) a.sort() if a == [5,5,7]: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s080428523
p04043
Runtime Error
data = input() flag1 = 0 flag2 = 0 for i in range(3): if data[i] = '5': flag1 += 1 elif data[i] = '7': flag2 += 1 if flag1 == 1 and flag2 == 2: print('YES') else: print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s918432502
p04043
Runtime Error
a = int(input()) b = int(input()) c = int(input()) list = [a,b,c] if(7 in list): if list.count(5)==2: print("YES") else: print("NO") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s824754189
p04043
Runtime Error
input_a = input().split() kazu = int(input_a[0]) + 1 suuji_kosuu = int(input_a[1]) input_b = input().split() for i in range(kazu,10000): t = 0 for j in range(suuji_kosuu): if input_b[j] in str(i): break else: t = t+1 continue if t == suuji_kosuu: print(i) break
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s082251248
p04043
Runtime Error
import numpy as np n = list(map(int, input().split())) d = np.array(list(map(int, input().split()))) a = len(str(n[0])) x = np.zeros(a + 1) for i in range(a + 1): x[i] = (n[0] % np.power(10, a - i + 1)) // np.power(10, a - i) i = 1 while 1: while np.any(d == x[i]): x[i] += 1 x[i + (i != a):] = 0 if x[i] == 10: x[i - 1] += 1 x[i:] = 0 i = 0 i += 1 if np.any(d == x[0]) and x[0] != 0: i = 0 if i == a: break ans = 0 for i in range(a + 1): ans += x[i] * np.power(10, a - i) print(int(ans))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s076726769
p04043
Runtime Error
import numpy as np n = list(map(int, input().split())) d = np.array(list(map(int, input().split()))) while 1: a = (n[0] % 10000) // 1000 b = (n[0] % 1000) // 100 c = (n[0] % 100) // 10 e = n[0] % 10 f = n[0] // 10000 if f != 0 and np.any(d == f): n[0] = (f + 1) * 10000 elif np.any(d == a): n[0] = f * 10000 + (a + 1) * 1000 elif np.any(d == b): n[0] = f * 10000 + a * 1000 + (b + 1) * 100 elif np.any(d == c): n[0] = f * 10000 + a * 1000 + b * 100 + (c + 1) * 10 elif np.any(d == e): n[0] += 1 else: print(n[0]) break
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s764050832
p04043
Runtime Error
import numpy as np n = list(map(int, input().split())) d = np.array(list(map(int, input().split()))) while 1: a = (n[0] % 10000) // 1000 b = (n[0] % 1000) // 100 c = (n[0] % 100) // 10 e = n[0] % 10 f = n[0] // 10000 if np.any(d == f): n[0] = f * 10000 elif np.any(d == a): n[0] = f * 10000 + (a + 1) * 1000 elif np.any(d == b): n[0] = a * 1000 + (b + 1) * 100 elif np.any(d == c): n[0] = a * 1000 + b * 100 + (c + 1) * 10 elif np.any(d == e): n[0] += 1 else: print(n[0]) break
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s344630549
p04043
Runtime Error
import numpy as np n = list(map(int, input().split())) d = np.array(list(map(int, input().split()))) while 1: if np.any(d == (n[0] // 1000)): n[0] += 1000 - (n[0] % 1000) elif np.any(d == (n[0] % 1000) // 100): n[0] += 100 - (n[0] % 100) elif np.any(d == (n[0] % 100) // 10): n[0] += 10 - (n[0] % 10) elif np.any(d == n[0] % 10): n[0] += 1 else: print(n[0]) break
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s234876854
p04043
Runtime Error
input_line = input().split() #print(input_line) count5 = 0 count7 = 0 #print(input_line[0]) #print(len(input_line)) for i in range(len(input_line)): # print(input_line[i]) if int(input_line[i]) == 5: # print(input_line[i]) count5 += 1 # print(count5) elif int(input_line[i]) == 7: count7 += 1 # print(count7) if count5 == 2 and count7 == 1: print("YES") # print(count5,count7) else: # print(count5,count7)
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s177549640
p04043
Runtime Error
a, b, c = map(int, input().split()) if a == 5 and b == 7 and c = 5: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s999611286
p04043
Runtime Error
a = int(input()) b = int(input()) c = int(input()) if a == 5 and b == 7 and c == 5: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s141236731
p04043
Runtime Error
a, b, c = map(int, input().split()) if a == 5 and b == 7 and c = 5: print("Yes") else: print("No")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s223497713
p04043
Runtime Error
import sys if sys.platform =='ios': sys.stdin=open('input_file.txt') S=map(int,input().split()) s=sorted(S) if s==5,5,7: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s491128273
p04043
Runtime Error
A = list(map(int, input().split())) five_cnt = 0 seven_cnt = 0 for a in A: if a == 5: five_cnt++ if a == 7: seven_cnt++ if five_cnt == 2 and seven_cnt == 1: print("Yes") else: print("No")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s562182310
p04043
Runtime Error
A, B, C = map(int, input().split()) if A+B+C is not 17: print('NO') exit(1) print('YES')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s015239002
p04043
Runtime Error
# coding:utf-8 x, y, z = [int(i) for i in input().split()] if x = 5 and y = 7 and z = 5: print("YES") elif x = 7 and y = 5 and z = 5: print("YES") elif x = 5 and y = 5 and z = 7: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s775834297
p04043
Runtime Error
# coding:utf-8 x, y, z = list(map(int, input().split())) if x = 5 and y = 7 and z = 5: print("YES") elif x = 7 and y = 5 and z = 5: print("YES") elif x = 5 and y = 5 and z = 7: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s723350851
p04043
Runtime Error
n,l=map(int,input().split( )) s=[] for i in range(n): s.append(input()) print(' '.join(sorted(s)))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s546743027
p04043
Runtime Error
#文字列大好きいろはちゃんイージー n,l=list(map(int,input().split( ))) s=[] for i in range(n): s.append(input()) print(' '.join(sorted(s)))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s336068594
p04043
Runtime Error
#文字列大好きいろはちゃんイージー import numpy as np n,l=list(map(int,input().split( ))) s=[] for i in range(n): s.append(input()) print(''.join(sorted(s)))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s743365296
p04043
Runtime Error
#文字列大好きいろはちゃんイージー import numpy as np n,l=list(map(int,input().split( ))) s=[] for i in range(n): s.append(input()) S="" a=0 while len(s)>0: for i in range(n-a): if s[i]==min(s): S+=s[i] del s[i] a+=1 break print(S)
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s524559488
p04043
Runtime Error
# -*- coding: utf-8 -*- """ Created on Wed Sep 18 13:12:09 2019 @author: reimu """ a = map(list, input().split()) if a.count('5') == 2 and a.count('7') == 1: print('YES') else: print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s284877187
p04043
Runtime Error
# -*- coding: utf-8 -*- """ Created on Wed Sep 18 13:12:09 2019 @author: reimu """ a = map(list, input().split()) if a.count(5) == 2 and a.count(7) == 1: print('YES') else: print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s622556069
p04043
Runtime Error
# -*- coding: utf-8 -*- """ Created on Wed Sep 18 13:12:09 2019 @author: reimu """ a = map(int, input().split()) if a.count(5) == 2 and a.count(7) == 1: print('YES') else: print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s681936605
p04043
Runtime Error
# -*- coding: utf-8 -*- """ Created on Wed Sep 18 13:12:09 2019 @author: reimu """ a = map(int, input().split()) if a.count(5) == 2 and a.count(7): print('YES') else: print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s502987077
p04043
Runtime Error
a = map(int, input().split()) if a.count(5) == 2 and a.count(7) == 1: print('YES') else: print('NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s626841225
p04043
Runtime Error
lst = map(int, input().split()) print("YES" if lst.count(5) == 2 and lst.count(7) == 1 else "NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s005099072
p04043
Runtime Error
N,L = map(int,input().split()) S = [] ans = "" for i in range(N): S.append(input()) sorted(S) for i in range(len(S)): ans += S[i] print(ans)
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s657579751
p04043
Runtime Error
A=input() B=input() C=input() for A,B,C in range(1,10): if A==5 B==5 C==7 || A==7 B==5 C==5 || A==5 B==7 C==5: print('Yes') else: print('No')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s671940754
p04043
Runtime Error
abc = [int (x) in input().split()] abc.sort() print('YES' if abc == [5, 5, 7] else 'NO')
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s587577110
p04043
Runtime Error
N, L = map(int, input().split()) Li = [input() for i in range(N)] s = "" for i in range(N): temp = min(Li) Li.remove(temp) s += temp print(s)
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s450024490
p04043
Runtime Error
N, L = map(int, input().split()) L = [input() for i in range(N)] s = "" for i in range(N): temp = min(L) L.remove(temp) s += temp print(s)
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s876574622
p04043
Runtime Error
# -*- coding: utf-8 -*- """ Created on Fri Sep 6 16:59:47 2019 @author: ask07 """ A=int(input("Aの文字数を入力:")) B=int(input("Bの文字数を入力:")) C=int(input("Cの文字数を入力:")) if A==5 and B==5 and C==7: print("YES") elif A==5 and B==7 and C==5: print("YES") elif A==7 and B==5 and C==5: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s224610599
p04043
Runtime Error
A=int(input()) B=int(input()) C=int(input()) if A==5 and B==5 and C==7: print("YES") elif A==5 and B==7 and C==5: print("YES") elif A==7 and B==5 and C==5: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s430156063
p04043
Runtime Error
A=int(input("Aの文字数を入力:")) B=int(input("Bの文字数を入力:")) C=int(input("Cの文字数を入力:")) if A==5 and B==5 and C==7: print("YES") elif A==5 and B==7 and C==5: print("YES") elif A==7 and B==5 and C==5: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s572277750
p04043
Runtime Error
# -*- coding: utf-8 -*- """ Created on Fri Sep 6 16:59:47 2019 @author: ask07 """ A=int(input("Aの文字数を入力:")) B=int(input("Bの文字数を入力:")) C=int(input("Cの文字数を入力:")) if A==5 and B==5 and C==7: print("YES") elif A==5 and B==7 and C==5: print("YES") elif A==7 and B==5 and C==5: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s370856308
p04043
Runtime Error
n, l = map(int, input().split()) str = [] for i in range(n): str.append(input()) str.sort() print(''.join(str))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s073018369
p04043
Runtime Error
n, l = map(int, input().split()) str = [] for i in range(n): str.append(input()) str.sort() print("".join(str))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s413698338
p04043
Runtime Error
A,B,C = int(input()) if A*B*C == 175: print("YES") else: print("NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s347938106
p04043
Runtime Error
n = input().split() print("YES") if n.count("5") ==2 and n.count("7") == 1 else "NO")
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s726834011
p04043
Runtime Error
N,K = map(int, input().split()) kirai = [int(i) for i in input().split()] usable_num = [1,2,3,4,5,6,7,8,9] for x in kirai: usable_num.remove(x) ketasu = len(str(N)) #print(ketasu) s = 0 for d in range(ketasu): s += min(usable_num) * 10 ** d if s >= N: print(s) else: print(N+min(usable_num))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s358375479
p04043
Runtime Error
a = input(); b = input(); c = input(); d = [a,b,c]; d.sort(); if d[0]==5 and d[1]==5 and d[2]==7: print("YES"); else: print("NO");
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s002765774
p04043
Runtime Error
# -*- coding: utf-8 -*- f_line = input().split() N = int(f_line[0]) L = int(f_line[1]) S = [] s = "" for i in range(N): S.append(input()) S.sort() for i in range(N): s = s + S[i] print("%s"%(s))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>
s959272074
p04043
Runtime Error
# -*- coding: utf-8 -*- f_line = input().split() N = int(f_line[0]) L = int(f_line[1]) S = [] s = "" for i in range(N): S.append(input()) S.sort() for i in range(N): s = s + S[i] print("%s"%(s))
5 5 7
YES
<span class="lang-en"> <p>Score : <var>100</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p> <p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p> </section> </div> <div class="part"> <section> <h3>Constraints</h3><ul> <li><var>1≦A,B,C≦10</var></li> </ul> </section> </div> <hr/> <div class="io-style"> <div class="part"> <section> <h3>Input</h3><p>The input is given from Standard Input in the following format:</p> <pre><var>A</var> <var>B</var> <var>C</var> </pre> </section> </div> <div class="part"> <section> <h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p> </section> </div> </div> <hr/> <div class="part"> <section> <h3>Sample Input 1</h3><pre>5 5 7 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 1</h3><pre>YES </pre> <p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p> </section> </div> <hr/> <div class="part"> <section> <h3>Sample Input 2</h3><pre>7 7 5 </pre> </section> </div> <div class="part"> <section> <h3>Sample Output 2</h3><pre>NO </pre></section> </div> </span>