submission_id
string
problem_id
string
status
string
code
string
input
string
output
string
problem_description
string
s263274843
p04043
Runtime Error
a1=input() a2=input() a3=input() a=[a1,a2,a3] a.sort() flag=0 for i in range(2): if a[i]!='5': flag=flag+1 if a[2]!='7': flag=flag+1 if flag==0: 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>
s576071726
p04043
Runtime Error
a,b,c=int(input().split() if a==5 and b==5 and c==7 or a==5 and b==7 and c==5 or 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>
s759699577
p04043
Runtime Error
X=map(int,input().split()) X.sort() if X==[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>
s809093766
p04043
Runtime Error
n,l=map(int,input().split()) s=list(input() for _ in range(n)) s.sort() result=''.join(s) print(result)
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>
s272798291
p04043
Runtime Error
s = list(map(int, input().split())) sort(s) if s == [5, 7, 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>
s349829928
p04043
Runtime Error
a = list(map(int,input().split())) a.sort() if a[0] == 5: if a[1] == 5: if a[2] == 7: return "YES": return "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>
s037063310
p04043
Runtime Error
s=input() a=[] for i in s: if i == 'B': if x: a.pop() else: a.append(i) 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>
s419456654
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>
s421634377
p04043
Runtime Error
# 入力 N,L=map(int,input().split()) l=[] for i in range(N): l.append(input()) # ソート l.sort() # 出力 print(''.join(l))
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>
s425678684
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>
s845150795
p04043
Runtime Error
# -*- coding: utf-8 -*- N,L = list(map(int, input().split())) l=[] for i in range(N): l.append(input()) l.sort() print(l)
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>
s707253448
p04043
Runtime Error
# -*- coding: utf-8 -*- N,L = list(map(int, input().split())) l=[] s=N*L for i in range(s): l.append(input()) l.sort() print(l)
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>
s097487186
p04043
Runtime Error
# -*- coding: utf-8 -*- N,L = list(map(int, input().split())) l=[] for i in range(N*L): l.append(input()) l.sort() print(l)
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>
s004766349
p04043
Runtime Error
# -*- coding: utf-8 -*- A_B_C = list(map(int, input().split())) ABC= A_B_C.soreted() 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>
s315620827
p04043
Runtime Error
s = 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>
s030168481
p04043
Runtime Error
abc=list(map(int,input().split())) abc.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>
s510012237
p04043
Runtime Error
a,b,c=input().split() if a==b==5: if c==7: return print("Yes") else: return print("No") elif a==c==5: if b==7: return print("Yes") else: return print("No") elif b==c==5: if a==7: return print("Yes") else: return print("No") else: return 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>
s174593658
p04043
Runtime Error
a, b, c=int(input(),split()) if a==7 and b==5 and c==5: print("YES") elif a==5 and b==7 and c==5: print("YES") elif 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>
s328834553
p04043
Runtime Error
ins = list(map(int, input().split())) N = ins[0] L = ins[1] Ss = [] for i in range(N): Ss.append(input()) for i, a in enumerate(Ss): key = a j = i - 1 while j >= 0 and Ss[j] > a: Ss[j + 1] = Ss[j] j = j - 1 Ss[j + 1] = key print(' '.join(Ss))
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>
s246525597
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>
s328818337
p04043
Runtime Error
if
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>
s669396824
p04043
Runtime Error
A,B,C = map(int,inputs().split()) if A + B + C == 17: if A + B or A + C or B + C == 10: 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>
s209909688
p04043
Runtime Error
A = map(int,input().split()) sorted(A) if A[0] == 5 and A[1] == 5 and A[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>
s181922994
p04043
Runtime Error
#N = input().split() #huga = list(map(int, input().split())) N = list(map(int, input().split())) if (N[0]==7 or N[1]==7 or N[2]==7){ if (N[0]==5 or N[1]==5 or N[2]==5 and N[0]+N[1]+N[2]==12){ 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>
s975964972
p04043
Runtime Error
N,L = map(int,input().split()) s = [str(input()) for i in range(N)] p = sorted(s) print("".join(p))
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>
s712122006
p04043
Runtime Error
if ((A=5 and B=5 and C=7)or(A=5 and B=7 and C=5)or(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>
s122767434
p04043
Runtime Error
if (A=5^B=5^C=7|A=5^B=7^C=5|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>
s590310085
p04043
Runtime Error
import sys a = int(input()) b = int(input()) c = int(input()) if (a == 5 or a == 7): if (b == 5 or b == 7): if (c == 5 or c == 7): d = a * b * c if (d == 175): print("YES") else: print("NO") else: print("NO") 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>
s235838224
p04043
Runtime Error
a , b = map(int,input().split()) list = [] papa = "" for i in range(b): list.append(input()) c = sorted(list) for x in c: papa += x print(papa)
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>
s513091256
p04043
Runtime Error
A,B,C = list(map(int,input().split())) if
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>
s992095903
p04043
Runtime Error
tupni = [int(idx) for idx in input.split(" ")] if tupni.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>
s961237892
p04043
Runtime Error
tupni = [int(idx) for idx in input.split()] if tupni.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>
s144245956
p04043
Runtime Error
L, N = map(int, input().split()) s = [input() for i in range(N)] s.sort() print(''.join(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>
s176350392
p04043
Runtime Error
N, L = map(int,input().split()) words = [] for i in range(N): words.append(input()) words.sort() print(''.join(words))
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>
s706432854
p04043
Runtime Error
sort_list = list(int(map, input().split())) if sort_list.count(5) == 1 and sort_list.count(7) == 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>
s997145750
p04043
Runtime Error
str = input() count5 = str.count(5) count7 = str.count(7) if count5 == 2 and count7 == 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>
s475685895
p04043
Runtime Error
num = input().split() str = input() strc = '' for i in range(int(num[0])-1): strc = input() if str > strc: str = strc + str else: str = str + strc print(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>
s105670510
p04043
Runtime Error
num= input().split() 5count = 0 7count = 0 for i in range(len(num)): if num[i] == '5': 5count += 1 elif num[i] == '7': 7count += 1 if 5count == 2 and 7count == 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>
s208632186
p04043
Runtime Error
num= int(input().split()) 5count = 0 7count = 0 for i in range(len(num)): if num[i] == 5: 5count += 1 elif num[i] == 7: 7count += 1 if 5count == 2 and 7count == 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>
s050195933
p04043
Runtime Error
a = list(map(int,input())) b = a.count('5') c = a.count('7') if b == 2 and c ==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>
s331775926
p04043
Runtime Error
a = list(map(int,input())) b = a.count(’5') c = a.count(’7') if b == 2 and c ==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>
s050631717
p04043
Runtime Error
a = list(map(int,input())) b = a.count(’5') c = a.count(’7') if b == 2 and c ==1: pritn('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>
s165142836
p04043
Runtime Error
a,b,c=(int(x) for x in input().split()) 7_count=0 5_count=0 def check(x): if x==5: global 5_count 5_count+=1 elif x==7: global 7_count 7_count+=1 check(a) check(b) check(c) if 7_count==1 and 5_count==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>
s438015842
p04043
Runtime Error
a,b,c=(int(x) for x in input().split()) 7_count=0 5_count=0 def check(x): if x==5: global 5_count 5_count+=1 elif x==7: global 7_count 7_count+=1 check(a) check(b) check(c) if 7_count=1 and 5_count=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>
s638442477
p04043
Runtime Error
a, b, c = map(int, input().split()) if a+b+c == 17 and 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>
s043605122
p04043
Runtime Error
a, b, c = map(int, input().split()) if a+b+c = 19: 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>
s883467072
p04043
Runtime Error
m, n = map(int,input().split()) l = map(str,input().split()) l2 = {str(i) for i in range(10)} l3 = set(l2) - set(l) ans = 0 for i in range(m, 100000): nums = set(str(i)) if nums <= l3: 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>
s983360800
p04043
Runtime Error
A, B, C = map(int, input().split()) if A + B + C == 17: if A == 5: if B + C == 12: print(YES) else: print(NO) if A == 7: if B + C == 10: print(YES) else: print(NO) 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>
s847345212
p04043
Runtime Error
A, B, C = map(int, input().split()) if A + B + C == 17: if A == 5: if B + C == 12: return YES else: return NO if A == 7: if B + C == 10: return YES else: return NO else: return NO else: return 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>
s980229367
p04043
Runtime Error
A, B, C = int(input().split().split()) array = [A, B, C] sa = sorted[array] if sa = [5, 5, 7]: return YES else: return 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>
s040614661
p04043
Runtime Error
import sys input = sys.stdin.readline N,K=map(int,input().rstrip().split()) D=list(map(int,input().rstrip().split())) def dfs(N): for i in range(K): if(str(N).find(str(D[i]))!=-1): dfs(N+1) return else: print(N) def resolve(): dfs(N) from io import StringIO import unittest class TestClass(unittest.TestCase): def assertIO(self, input, output): stdout, stdin = sys.stdout, sys.stdin sys.stdout, sys.stdin = StringIO(), StringIO(input) resolve() sys.stdout.seek(0) out = sys.stdout.read()[:-1] sys.stdout, sys.stdin = stdout, stdin self.assertEqual(out, output) def test_入力例_1(self): input = """1000 8 1 3 4 5 6 7 8 9""" output = """2000""" self.assertIO(input, output) def test_入力例_2(self): input = """9999 1 0""" output = """9999""" self.assertIO(input, output) if __name__ == "__main__": #unittest.main() resolve()
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>
s176610403
p04043
Runtime Error
h,w,a,b = map(int, input().split()) mod = 10**9 + 7 n = 10**5 * 2 + 1 fact = [1]*(n+1) rfact = [1]*(n+1) r = 1 for i in range(1, n+1): fact[i] = r = r * i % mod rfact[n] = r = pow(fact[n], mod-2, mod) for i in range(n, 0, -1): rfact[i-1] = r = r * i % mod # nPk (mod MOD) を求める def perm(n, k): return fact[n] * rfact[n-k] % mod # nCk (mod MOD) を求める def comb(n, k): return fact[n] * rfact[k] * rfact[n-k] % mod ans = 0 for i in range(b,w): ans = (ans + comb(h-a-1+i,i) * comb(w-i+a-2,a-1)) % mod 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>
s848242968
p04043
Runtime Error
x = list(map(str,input().split())) if '2' == x.value_counts('5') and '1' == x.value_counts('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>
s651107468
p04043
Runtime Error
a = input().split() p
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>
s525872771
p04043
Runtime Error
x = str(input()) if count(x,"5")==2 and count(x,"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>
s098870014
p04043
Runtime Error
s = map(int, input().split()) return (s[0] == s[1] == 5 and s[2] == 7 or s[2] == s[1] == 5 and s[0] == 7 or s[0] == s[2] == 5 and s[1] == 7)
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>
s031876204
p04043
Runtime Error
s = map(int, input().split()) return (s[0] == s[1] == 5 and s[2] == 7 or s[2] == s[1] == 5 and s[0] == 7 s[0] == s[2] == 5 and s[1] == 7)
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>
s066887132
p04043
Runtime Error
N, _ = map(int, input().split()) values = [input() for _ in range(N)] print(''.join(sorted(values)))
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>
s593918387
p04043
Runtime Error
a, b, c, = map(int(input().split())) h = [5, 5, 7] b = [a, b, c] if sorted(h) == sorted(b): 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>
s859556287
p04043
Runtime Error
a,b,c=map(int,input().split()) aa=sort([a,b,c]) if aa == [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>
s993246363
p04043
Runtime Error
import math h, w, a, b = map(int, input().split(' ')) MOD = 10**9 + 7 def ncr(n, r): f = math.factorial return f(n) / f(r) / f(n-r) r = 0 for i in range(b, w): y1 = h - a - 1 x1 = i y2 = a - 1 x2 = w - i - 1 p = (ncr(x1 + y1, x1) * ncr(x2 + y2, x2)) % MOD r = (r + p) % MOD print(int(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>
s638298266
p04043
Runtime Error
A,B,C = list(map(int,input().split())) if sort([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>
s890771249
p04043
Runtime Error
n, k = map(int, input().split()) dislikes = input().split() payment = n while True: tmp = str(payment) for t in tmp: if t in dislikes: break else: break payment += 1 print(payment)
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>
s337042599
p04043
Runtime Error
in = list(map(int,input().split())) in.sort() if in=[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>
s182944008
p04043
Runtime Error
number1 = input("First number: ") number2 = input("\nSecond number: ") number3 = input("\nSecond number: ") if ( (number1==5&number1==7&number1==5) | (number1==7&number1==5&number1==5) | (number1==5&number1==5&number1==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>
s704997992
p04043
Runtime Error
a,b,c=map(int,input().split()) if sorted(list[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>
s776095123
p04043
Runtime Error
a=input().split() a=[int(i) for i in a] 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>
s385261581
p04043
Runtime Error
a=[int(i) for i in 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>
s196026286
p04043
Runtime Error
a=[int(i) for i in 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>
s861348925
p04043
Runtime Error
a=[int(i) for i in 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>
s597664832
p04043
Runtime Error
def abc ( ) : \n l = '' . join ( input ( ) . split ( ) ) \n print ( 'YES' if l . replace ( '5' , '' ) == '7' else 'NO' ) \n \n \n abc ( )
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>
s113472835
p04043
Runtime Error
N = list(map(int,input().split())) five = 0 seven = 0 for i in N: if i == 5: five += 1 elif i == 7: seven += 1 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>
s785514931
p04043
Runtime Error
a,b,c = map(int,input().split())Liste= list(map(str,input().split())) P = Liste.count('5') Q = Liste.count('7') if P == 2 and Q == 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>
s893277241
p04043
Runtime Error
if A==5 and B==5 and C==7 or A==5 and B==7 and C==5 or A==7 and B==5 and C==5; print("YES"); else; print("NO"); end
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>
s173668595
p04043
Runtime Error
# -*- coding: utf-8 -*- # 整数の入力 a, b, c = map(int, input().split()) # 575判定式 if(a*b*c == 5*7*5 && 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>
s373271277
p04043
Runtime Error
a = input() b = input() c = input() if len(a) == 5 and len(b) == 5: if len(c) == 7: 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>
s496652683
p04043
Runtime Error
A, B, C = map(input().split()) l = [5, 5, 7] if A in l: l.remove(A) if B in l: if C in l: print('YES') break 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>
s628299046
p04043
Runtime Error
ABC = [int(i) fo i in input()) ABC.sort() if sum(ABC) == 17 and ABC[0] == 5 and ABC[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>
s066653964
p04043
Runtime Error
A,B,C = map(input().split()) a, b, c = len(A), len(B), len(C) if a == 5 or a == 7: if b == 5: if c == 5: print('NO') else: print('YES') else: if 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>
s001036267
p04043
Runtime Error
A,B,C = map(int, input().split()) if A==7 and B==5 and C==5: print("Yes") else if A==5 and B==5 and C==7: print("Yes") else 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>
s415849840
p04043
Runtime Error
##### 解けた ##### A,B,C=list(map(int,input().split(" "))) if (len(A)==5 and len(B)==7 and len(C)==5) or (len(A)==7 and len(B)==5 and len(C)==5) or (len(A)==5 and len(B)==5 and len(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>
s910065980
p04043
Runtime Error
l =list(map(int,input().split())) if l[0]+l[1]+[2]==17 and l[0]*l[1]*l[2]== 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>
s617605498
p04043
Runtime Error
a,b,c =int(x) for in input().split() if a+b+c==17 and 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>
s815122129
p04043
Runtime Error
#!/usr/bin/env python3 import sys, math, itertools, heapq, collections, bisect, fractions input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') sys.setrecursionlimit(10**8) inf = float('inf') ans = count = 0 n,k=map(int,input().split()) D=set(input().split()) while True: ns=str(n) for ni in ns: if ni in D: break else: print(n) exit() n+=1 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>
s139649363
p04043
Runtime Error
a, b, c = map(int, input().split()) if sorted(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>
s006892585
p04043
Runtime Error
A = list(map(int, input().split())) if A == [5,7,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>
s789451583
p04043
Runtime Error
A = int(input()).split() if A.count("5") == 2 and A.count("7")==1: print("YSE") 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>
s285101555
p04043
Runtime Error
A = int(input()).split() if A.count.("5") == 2 and A.count("7")==1: print("YSE") 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>
s595519916
p04043
Runtime Error
A = int(input()).split() if A.count.("5") == 2 and a.count("7")==1: print("YSE") 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>
s714171186
p04043
Runtime Error
a = list(map(int, input().split())) s = [input() for i in range(a[0])] newa= sorted(s) moji ='' for x in newa: moji += x print(moji)
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>
s490667560
p04043
Runtime Error
a = list(map(int, input().split())) s = [input() for i in range(a[0])] newa= sorted(s) print(a[0],a[1]) [print(i) for i in newa]
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>
s740123620
p04043
Runtime Error
NL=input().split() N=int(NL[0]) L=int(NL[1]) S=[] rank=[] for i in range(N): S.append(input()) rank.append(0) temp=[] for i in range(N): for j in range(N): if(S[i]<S[j]): temp.append(int(1)) else: temp.append(int(0)) for i in range(N*N): a=i%N rank[a]+=temp[i] j=0 moji="" for i in range(N): for j in range(N): if(i==rank[j]): moji=moji+S[j] print(moji)
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>
s988567501
p04043
Runtime Error
NL=input().split() N=int(NL[0]) L=int(NL[1]) S=[] rank=[] for i in range(N): S.append(input()) rank.append(0) temp=[] for i in range(N): for j in range(N): if(S[i]<S[j]): temp.append(int(1)) else: temp.append(int(0)) for i in range(N*N): a=i%N rank[a]+=temp[i] j=0 moji="" for i in range(N): for j in range(N): if(i==rank[j]): moji=moji+S[j] print(moji)
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>
s377784778
p04043
Runtime Error
A = int(input()) B = int(input()) C = int(input()) if A == 5 or A == 7: if B == 5 or B == 7: if C == 5 or C == 7: if A + B + C == 17: print('Yes') else: print('No') else: print('No') 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>
s598529296
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>
s977372704
p04043
Runtime Error
A, B, C = int(input()), int(input()), int(input()) if [A, B, C].count(5) == 2 and [A, B, C].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>
s866954681
p04043
Runtime Error
A, B, C = ( int( input() ) for i in range(3) ) if [A, B, C].count(5) == 2 and [A, B, C].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>
s933001239
p04043
Runtime Error
A,B,C=(int(x) for x in 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>
s420944637
p04043
Runtime Error
n = list(map(int, input().split())) N = n[0] K = n[1] d = list(map(int, input().split())) num = [i for i in range(1,10)] for i in d: if i == 0: continue else: num.remove(i) total = N*min(num) if total > N: print(N) else: print(total)
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>
s248644009
p04043
Runtime Error
N,K = [int(i) for i in input().split()] #D = [int(i) for i in input().split()]は数値代入 #文字列を複数代入 D = input().split() #集合に置き換える(型はset) D = set(D) use = set(['0','1','2','3','4','5','6','7','8','9']) use -= D for i in range(N,10001): if use >= set(str(i)): 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>