s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
int64
0
100
memory
stringlengths
4
6
code_size
int64
15
14.7k
code
stringlengths
15
14.7k
problem_id
stringlengths
6
6
problem_description
stringlengths
358
9.83k
input
stringlengths
2
4.87k
output
stringclasses
807 values
__index_level_0__
int64
1.1k
1.22M
s027240034
p00628
u395654950
1593406753
Python
Python3
py
Accepted
20
5556
340
# coding: utf-8 # Your code here! while True: s = input() if s == "END OF INPUT": break s += " " #ๆ–‡ๅญ—ๅˆ—ใฎๆ–‡ๆœซใซใ‚นใƒšใƒผใ‚นใ‚’ๅŠ ใˆใ‚‹ #print(s) c = 0 for i in range(len(s)): #print(s[i]) if s[i] == ' ': print(c, end = "") c = 0 continue c += 1 print("")
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,577
s057287085
p00628
u016268270
1592923101
Python
Python3
py
Accepted
20
5560
209
while True: s = input() if s == 'END OF INPUT': break s = s.translate(str.maketrans({' ': ','})) s = s.split(',') ans = '' for i in s: ans += str(len(i)) print(ans)
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,578
s897618075
p00628
u430753724
1592402994
Python
Python3
py
Accepted
20
5556
271
# -*- coding: utf-8 -*- from sys import stdin while True: s = stdin.readline().rstrip() if s == 'END OF INPUT': break ans = '' cnt = 0 for i in s: if i == ' ': ans += str(cnt) cnt = 0 else: cnt += 1 ans += str(cnt) print(ans)
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,579
s043302486
p00628
u636273094
1592229129
Python
Python3
py
Accepted
20
5556
121
while 1: inp=input() if(inp=="END OF INPUT"): break print(''.join(map(str,map(len,inp.split(' ')))))
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,580
s164382478
p00628
u988962397
1592125872
Python
Python3
py
Accepted
20
5556
216
while True: retu=input() if retu=="END OF INPUT": break moji=retu.split(" ") n=len(moji) for i in range(n): k=len(moji[i]) print(k, end="") print()
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,581
s165212054
p00628
u994684803
1592037133
Python
Python3
py
Accepted
40
6492
250
import re while True: a = input() if a == "END OF INPUT": break a = re.split('[ ]',a) ans = [] for i in a: ans.append(len(i)) ans = [str(i) for i in ans] ans = "".join(ans) print(ans)
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,582
s967265175
p00628
u228556128
1591795957
Python
Python3
py
Accepted
20
5548
197
while True: s=input() if s=="END OF INPUT": break c=0 for i in s: if i!=" ": c+=1 else: print(c,end="") c=0 print(c)
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,583
s613403789
p00628
u747915832
1590252583
Python
Python3
py
Accepted
20
5560
196
while True: text = input() if text=='END OF INPUT': break TEXT = text.split(' ') for i in range(len(TEXT)): print(len(TEXT[i]),end='') print('')
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,584
s152747918
p00628
u254617460
1589696646
Python
Python3
py
Accepted
20
5560
224
while True: text = input() if text == 'END OF INPUT': break text = list(text.split(' ')) answer = [] for i in range(len(text)): answer.append(str(len(text[i]))) print("".join(answer))
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,585
s888521696
p00628
u240091169
1589680089
Python
Python3
py
Accepted
30
5552
271
while True : a = input() if a == "END OF INPUT" : break b = list(a) count = 0 for i in range(len(b)) : if b[i] != ' ' : count += 1 else : print(count, end="") count = 0 print(count)
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,586
s032728218
p00628
u037441960
1589443386
Python
Python3
py
Accepted
20
5564
681
while True : S = input() if S == "END OF INPUT" : break else : S += " " N = [] s = 0 b = 0 for i in range(len(S)) : if S[i] != " " : s += 1 else : b += 1 if b == 1 : ...
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,587
s774385813
p00628
u814278309
1589178279
Python
Python3
py
Accepted
20
5548
250
while 1: a = input() if a == "END OF INPUT": break else: c = 0 for i in a: if i == ' ': print(c,end = "") c = 0 else: c += 1 print(c)
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,588
s483749595
p00628
u014861569
1588966093
Python
Python3
py
Accepted
20
5552
182
while 1: n=input() if n=="END OF INPUT": break c=0 for i in n: if i==' ': print(c,end="") c=0 else:c+=1 print(c)
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,589
s622211835
p00628
u670660757
1582034196
Python
Python3
py
Accepted
20
5552
344
while True: s = input() if s == 'END OF INPUT': break # for word in s.split(): # print(len(word), end='') # print() count = 0 for i in range(len(s)): if s[i:i + 1] == ' ': print(count, end='') count = 0 else: count += ...
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,590
s629577087
p00628
u123563150
1577084821
Python
Python3
py
Accepted
20
5560
172
import sys while True: s=sys.stdin.readline().rstrip() if s=="END OF INPUT": exit() s=s.split(" ") ans="" for i in range(len(s)): ans+=str(len(s[i])) print(ans)
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,591
s308347312
p00628
u829695570
1576849129
Python
Python3
py
Accepted
20
5560
167
while 1: s = input() if s == 'END OF INPUT': break a = list(s.split(' ')) for i in range(len(a)): print(len(a[i]), end='') print()
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,592
s352909324
p00628
u167152630
1576480995
Python
Python3
py
Accepted
20
5556
345
while True: line = input() if line == 'END OF INPUT': break output_count_list = [] count = 0 for c in line: if c != ' ': count += 1 else: output_count_list.append(str(count)) count = 0 output_count_list.append(str(count)) print(''....
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,593
s127183255
p00628
u314932236
1568351962
Python
Python3
py
Accepted
20
5564
427
import sys sys.setrecursionlimit(10**6) def main(): s = input() if s == "END OF INPUT": return False if s[0] == " ": s[0] = "." for _ in range(100): s = s.replace(" ", " . ") lst = s.split() ans = [] for i in lst: if i == ".": ans += [0] e...
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,594
s636762590
p00628
u784856415
1567336769
Python
Python3
py
Accepted
20
5560
579
#import pysnooper #import os,re,sys,operator,math,heapq,string #from collections import Counter,deque #from operator import itemgetter #from itertools import accumulate,combinations,groupby,combinations_with_replacement from sys import stdin,setrecursionlimit #from copy import deepcopy setrecursionlimit(10**6) input=s...
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,595
s220229419
p00628
u108130680
1563439574
Python
Python3
py
Accepted
20
5548
269
flag = True while flag: n = input() if n == "END OF INPUT": flag = False else: count = 0 for c in n: if c == " ": print(count, end = "") count = 0 else: count += 1 print(count)
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,596
s101601780
p00628
u314166831
1562170602
Python
Python3
py
Accepted
20
5660
2,207
# coding=utf-8 ### ### for atcorder program ### import sys import math # math class class mymath: ### pi pi = 3.14159265358979323846264338 ### Prime Number def pnum_eratosthenes(self, n): ptable = [0 for i in range(n+1)] plist = [] for i in range(2, n+1): if ptab...
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,597
s991046592
p00628
u717526540
1544684393
Python
Python3
py
Accepted
20
5556
259
while 1: word = input() if word == "END OF INPUT": break ans = "" cnt = 0 for w in word: if w == " ": ans += str(cnt) cnt = 0 else: cnt += 1 ans += str(cnt) print(ans)
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,598
s795101262
p00628
u352394527
1544000541
Python
Python3
py
Accepted
20
5564
260
while True: s = input() if s == "END OF INPUT": break lst = [] ind = 0 count = 0 while ind < len(s): if s[ind] == " ": lst.append(count) count = 0 else: count += 1 ind += 1 lst.append(count) print(*lst,sep="")
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,599
s469257799
p00628
u725998488
1538661608
Python
Python3
py
Accepted
20
5556
178
while True: m = input() if m == "END OF INPUT": break m = m.split(" ") li = [] for i in m: li.append(len(i)) print("".join(map(str, li)))
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,600
s296508310
p00628
u009288816
1533634629
Python
Python3
py
Accepted
20
5564
373
while True: string = input() if string == 'END OF INPUT': break ans = [] temp = 0 space = 0 for i in range(len(string)): if string[i] == ' ' and space == 0: ans.append(temp) temp = 0 space = 1 continue elif space > 0 and string[i] == ' ': ans.append(0) continue space = 0 temp += 1 ans...
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,601
s091280460
p00628
u539753516
1533402083
Python
Python3
py
Accepted
20
5560
128
while 1: a=input() if a=="END OF INPUT":break a=list(map(lambda x: str(len(x)),a.split(" "))) print("".join(a))
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,602
s038677353
p00628
u170928472
1533013703
Python
Python
py
Accepted
10
4632
184
ans = '' s = '' while 1: s = raw_input() if s == 'END OF INPUT': break s = s.replace(' ', '0').split('0') for i in s: ans += str(len(i)) ans += '\n' print(ans.rstrip('\n'))
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,603
s868285150
p00628
u150984829
1532833697
Python
Python3
py
Accepted
20
5560
95
for e in iter(input,'END OF INPUT'): print(*[len(x)*(x!='')for x in e.split(' ')], sep='')
p00628
<H1><font color="#000000">Problem P02:</font> Yes, I have a number</H1> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ŒYes, I have a numberใ€ใฃใฆ็Ÿฅใฃใฆใ‚‹ใ‹ใ„๏ผŸ </p> <p> ใบใƒผใ‚ฟใƒผ๏ผšใ€€ใ“ใฎใพใˆใƒ†ใƒฌใƒ“ใงใ‚„ใฃใฆใพใ—ใŸใ‚ˆใ€‚ๆ–‡็ซ ใซๅซใพใ‚Œใ‚‹ๅ„ๅ˜่ชžใฎๆ–‡ๅญ—ๆ•ฐใงไฝ•ใ‹ใ‚’่ฆšใˆใ‚‹ใจใ„ใ†ใ‚‚ใฎใงใ™ใ‚ˆใญใ€‚ ใ€ŒYes, I have a numberใ€ ใ ใ‹ใ‚‰ใ€ใ€Œ3.14ใจใ„ใ†ๆ•ฐๅญ—ใ€ใจใ„ใ†ๆ„ๅ‘ณใซใชใฃใฆๅ††ๅ‘จ็އใ‚’่ฆšใˆใ‚‹ใŸใ‚ใฎใ‚ญใƒผใƒฏใƒผใƒ‰ใซใชใฃใฆใ„ใ‚‹ใ‚“ใงใ™ใ‚ˆใญใ€‚ </p> <p> ๅšๅฃซ๏ผšใ€€ใƒšใƒผใ‚ฟใƒผๅ›ใ€ใใ‚Œใฏ้•ใ†ใ‚“ใ˜ใ‚ƒใ€‚ ใ“ใ‚Œใฏใ€3.1416 ใจ่งฃ้‡ˆใ›ใญใฐใชใ‚‰ใฌใฎใ˜ใ‚ƒใ€‚ๅ††ๅ‘จ็އใฏ3.1...
Yes I have a number How I wish I could calculate an unused color for space Thank you END OF INPUT
31416 31415926535 53
23,604
s539091048
p00629
u847467233
1530860754
Python
Python3
py
Accepted
30
5620
549
# AOJ 1043: Selecting Teams Advanced to Regional # Python3 2018.7.6 bal4u def pr(i, u): global total print(team[i][0]) total, affi[u] = total+1, affi[u]+1 while True: n = int(input()) if n == 0: break team = [] for i in range(n): id, u, a, p = map(int, input().split()) team.append((id, u, a, p)) team.sort...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,605
s397256424
p00629
u847467233
1530861057
Python
Python3
py
Accepted
20
5624
569
# AOJ 1043: Selecting Teams Advanced to Regional # Python3 2018.7.6 bal4u def pr(i, u): global total print(team[i][0]) total, affi[u] = total + 1, affi[u] + 1 while True: n = int(input()) if n == 0: break team = [list(map(int, input().split())) for i in range(n)] team.sort(key=lambda x: (...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,606
s610875645
p00629
u266872031
1474218474
Python
Python
py
Accepted
30
6336
825
while(1): n=int(raw_input()) if n==0: break else: Slist=[] Blist=[0 for i in range(1001)] ans=[] allb=0 thres=3 for k in range(n): S=[int(x) for x in raw_input().split()] Slist.append(S) Slist.sort(key = lambda ...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,607
s220968686
p00629
u819979588
1513584651
Python
Python
py
Accepted
10
4720
720
def sort_cmp(x, y): if x[2] == y[2]: return x[3] < y[3] else: return x[2] > x[2] def solve(n): teams = [] for i in range(n): teams.append(list(map(int, raw_input().split()))) teams = sorted(teams, key=lambda x: -1e12 * x[2] + x[3] * 1e6 + x[0]) A = [] B = [] t...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,608
s342560511
p00629
u139412071
1517031987
Python
Python3
py
Accepted
30
5612
784
def main(): while True: n = int(input()) if n == 0: break teams = [] for i in range(n): teams.append(list(map(int, input().split()))) def same_len(l): return len(list(filter(lambda x: x[1] == e[1], ans))) ans = [] rank = sort...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,609
s272431041
p00629
u724548524
1526518219
Python
Python3
py
Accepted
30
5612
903
while True: n = int(input()) if n == 0:break p = [tuple(map(int, input().split())) for _ in range(n)] p.sort() p.sort(key = lambda x:x[3]) p.sort(key = lambda x:x[2], reverse = True) s = 0 sg = {} for i in p: if s < 10: try: if sg[i[1]] < 3: ...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,610
s053596730
p00629
u104911888
1367978647
Python
Python
py
Accepted
10
4656
596
from collections import defaultdict while True: n=input() if n==0:break L,T=[],[] dic=defaultdict(int) for i in range(n): ID,U,A,P=map(int,raw_input().split()) L.append((-A,P,ID,U)) L.sort() for A,P,ID,U in L: if len(T)<10: if dic[U]<3: T....
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,611
s542920975
p00629
u633068244
1396527817
Python
Python
py
Accepted
20
4284
355
while 1: n=input() if n==0:break t=[map(int,raw_input().split()) for i in [1]*n] t=sorted(sorted(sorted(t),key=lambda x:x[3])[::-1],key=lambda x:x[2])[::-1] u=[0 for i in range(1001)] s=0 for i in t: if (s<10 and u[i[1]]<3) or (s<20 and u[i[1]]<2) or (s<26 and u[i[1]]<1): print i[...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,612
s540353760
p00629
u633068244
1396534249
Python
Python
py
Accepted
10
4272
355
while 1: n=input() if n==0:break t=[map(int,raw_input().split()) for i in [1]*n] t=sorted(sorted(sorted(t),key=lambda x:x[3])[::-1],key=lambda x:x[2])[::-1] u=[0]*1001 s=0 for i in t: if (s<10 and u[i[1]]<3) or (s<20 and u[i[1]]<2) or (s<26 and u[i[1]]<1): print i[0] ...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,613
s761733756
p00629
u636273094
1592966003
Python
Python3
py
Accepted
20
5616
973
while 1: in_tmp = input() if (in_tmp == "0"): break list_team = [] for i in range(int(in_tmp)): list_team.append(list(map(int,input().split()))) list_sorted = sorted(list_team, key=lambda x:(-x[2], x[3], x[0])) cnt_passed = 0 dict_passed = {} for item in list_sorted:...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,614
s332246983
p00629
u430753724
1592406510
Python
Python3
py
Accepted
30
5732
1,375
# -*- coding: utf-8 -*- from sys import stdin from operator import itemgetter while 1: n = int(stdin.readline().rstrip()) if n == 0: break teams = [] #้ธๆŠœใ•ใ‚ŒใŸใƒใƒผใƒ  Selected_team_id = [] cnt_selected_teams = 0 #ๆ‰€ๅฑžใ”ใจใฎใƒฉใƒณใ‚ญใƒณใ‚ฐ๏ผˆๆ‰€ๅฑžใ”ใจใฎ้ธๆŠœใƒใƒผใƒ ๆ•ฐ๏ผ‰ dic_shozoku_and_cntSelected = {} for i in range(n): * t, = map...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,615
s288567177
p00629
u240091169
1590336588
Python
Python3
py
Accepted
20
5620
813
while True : n = int(input()) if n == 0 : break Team = [list(map(int, input().split())) for i in range(n)] Team.sort(key=lambda x: (-x[2], x[3], x[0])) Senbatsu_Syozoku = [0] * 1001 Senbatsu_amount = 0 for i in range(n) : if Senbatsu_amount < 10 and Senbatsu_Syozoku...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,616
s239329399
p00629
u670660757
1583139726
Python
Python3
py
Accepted
50
5608
1,659
def team_sort(teams, n): for i in range(n - 1): #print(i) for j in range(n - i - 1): #print(i, j, teams[j][2], teams[j+1][2]) if (teams[j][2] < teams[j + 1][2]): tmp = teams[j] teams[j] = teams[j+1] teams[j+1] = tmp ...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,617
s915570412
p00629
u717526540
1544687135
Python
Python3
py
Accepted
20
5616
639
while 1: n = int(input()) if n == 0: break data = [] for _ in range(n): i, u, a, p = map(int, input().split()) data.append([i, u, a, p]) data = sorted(data, key=lambda x: (-x[2], x[3], x[0])) union = [0] * 1001 cnt = 0 for d in data: i, u, a, p = d ...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,618
s228058922
p00629
u352394527
1544001416
Python
Python3
py
Accepted
30
5996
563
from collections import defaultdict while True: n = int(input()) if n == 0: break teams = [] for _ in range(n): i, u, a, p = map(int, input().split()) teams.append((-a, p, i, u)) teams.sort() u_counter = defaultdict(int) all_counter = 0 selected = [] for _, _, i, u in teams: if all_...
p00629
<H1><font color="#000000">Problem 03:</font> Selecting Teams Advanced to Regional</H1> <p> ๆ—ฅๆœฌใงๆฏŽๅนด้–‹ๅ‚ฌใ•ใ‚Œใ‚‹ๅ›ฝ้š›ๅคงๅญฆๅฏพๆŠ—ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใ‚ณใƒณใƒ†ใ‚นใƒˆใฎใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅŽณใ—ใ„ๅ›ฝๅ†…ไบˆ้ธใ‚’็ช็ ดใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ </p> <p> ๅคงๅญฆๅฏพๆŠ—ใจใฏ่จ€ใฃใฆใ‚‚ใ€๏ผ‘ใคใฎๅญฆๆ กใ‹ใ‚‰่ค‡ๆ•ฐใฎใƒใƒผใƒ ใŒๅ‚ๆˆฆใ—ใพใ™ใ€‚ใใ“ใงใ€ใงใใ‚‹ใ ใ‘ๅคšใใฎๅญฆๆ กใŒใ‚ขใ‚ธใ‚ขๅœฐๅŒบไบˆ้ธใซๅ‡บๅ ดใงใใ‚‹ใ‚ˆใ†ใซใ€็ช็ ดใƒใƒผใƒ ใฎ้ธๆŠœใซใฏไปฅไธ‹ใฎ้ธๆŠœใƒซใƒผใƒซใŒ้ฉ็”จใ•ใ‚Œใพใ™๏ผš </p> <p> ่ฉฒๅฝ“ใƒใƒผใƒ ใ‚’ <i>A</i> ใจใ—ใ€ๆˆ็ธพใฎๅ„ช็ง€ใช้ †็•ชใซๆฌกใฎใƒซใƒผใƒซใ‚’้ฉ็”จใ—ใพใ™๏ผš </p> <...
6 1 1 6 200 2 1 6 300 3 1 6 400 4 2 5 1200 5 1 5 1400 6 3 4 800 3 777 1 5 300 808 2 4 20 123 3 6 500 2 2 1 3 100 1 1 3 100 0
1 2 3 4 6 123 777 808 1 2
23,619
s232715296
p00630
u847467233
1530863637
Python
Python3
py
Accepted
20
5564
682
# AOJ 1044: CamelCase # Python3 2018.7.6 bal4u while True: n, t = input().split() if t == 'X': break ans, n = '', list(n) if t == 'U': ans += n.pop(0).upper() while n != []: while n != [] and n[0] != '_': ans += n.pop(0) if len(n) > 1 and n[0] == '_': del n[0] ans += n.pop(0).upper() elif t == '...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,620
s634462297
p00630
u041086527
1416205023
Python
Python
py
Accepted
20
4304
1,225
while True: name,type = map(str, raw_input().split()) ans = "" if (type == 'X'): break names = [] if (name.find("_") != -1): names = name.split("_") elif (name[0].islower() == True): tmp = name[0] for i in range(1, len(name)): if (name[i].isupper() == ...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,621
s847758927
p00630
u266872031
1474217485
Python
Python
py
Accepted
10
6296
674
while(1): [inp, s]=raw_input().split() if s=='X': break else: words=[] if '_' in inp: words=inp.split('_') else: w=inp[0].lower() for c in inp[1:]: if c.isupper(): words.append(w) w=c....
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,622
s025854379
p00630
u546285759
1508793342
Python
Python3
py
Accepted
20
7480
821
while True: words, type_ = input().split() if type_ == "L": if "_" in words: words = words.split("_") words = words[0] + "".join([w[0].upper() + w[1:] for w in words[1:]]) else: words = words[0].lower() + words[1:] elif type_ == "U": if "_" in word...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,623
s198098697
p00630
u724548524
1526519391
Python
Python3
py
Accepted
20
5564
628
while True: s, cc = input().split() if cc == "X":break if "_" in s: t = s.split("_") else: t = [] j = 0 for i in range(1, len(s)): if s[i].isupper(): t.append(s[j:i]) j = i t.append(s[j:]) if cc == "U": for i...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,624
s846254292
p00630
u104911888
1371011516
Python
Python
py
Accepted
10
4236
438
import re while True: name,typ=raw_input().split() if name=="EndOfInput" and typ=="X":break if "_" in name: L=name.split("_") else: L=re.findall("[A-Z][a-z]*",name[0].upper()+name[1:]) if typ=="D": print "_".join(map(lambda s:s.lower(),L)) elif typ=="U": print ""...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,625
s009896690
p00630
u633068244
1398830699
Python
Python
py
Accepted
10
4280
784
upp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" low = "abcdefghijklmnopqrstuvwxyz" while 1: a,type = raw_input().split() if type == "X": break ans = "" if type == "U": if "_" in a: words = a.split("_") for word in words: ans += upp[low.index(word[0])] + word[1:] else: ans = upp[low.index(a[0])] + a[1:] if a[0]...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,626
s308364434
p00630
u633068244
1398831292
Python
Python
py
Accepted
10
4236
507
while 1: a,type = raw_input().split() if type == "X": break ans = "" if type == "U": for word in a.split("_"): ans += word[0].upper() + word[1:] elif type == "L": for word in a.split("_"): ans += word[0].upper() + word[1:] ans = ans[0].lower() + ans[1:] else: if "_" not in a: words = [] sp = 0...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,627
s606574307
p00630
u470391435
1597721493
Python
Python3
py
Accepted
20
5560
477
while True: a, b = map(str,input().split()) if b=='X': break if '_' in a: c = a.split('_') else: c=[] k = 0 for i in range(1,len(a)): if a[i].isupper(): c.append(a[k:i]) k = i c.append(a[k:]) if b=='D': ...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,628
s244426596
p00630
u593595530
1597666768
Python
Python3
py
Accepted
30
5564
523
while True: a, b = input().split() if b == 'X': break if '_' in a: ans = a.split('_') else: ans = [] j = 0 for i in range(1, len(a)): if a[i].isupper(): ans.append(a[j:i]) j = i ans.append(a[j:]) if...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,629
s123047540
p00630
u057249340
1597233182
Python
Python3
py
Accepted
20
5560
524
while True: a, b = input().split() if b == 'X': break if '_' in a: ans = a.split('_') else: ans = [] j = 0 for i in range(1, len(a)): if a[i].isupper(): ans.append(a[j:i]) j = i ans.append(a[j:]) if...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,630
s175266710
p00630
u826807985
1596959395
Python
Python3
py
Accepted
30
6512
706
import re while True: n,t=map(str,input().split()) if t == 'X': break if '_' in n : if t == 'D': print(n) else: m = n.title() l= re.sub('_', '',m) if t == 'U': print(l) elif t == 'L': ...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,631
s573521732
p00630
u037263780
1596878008
Python
Python3
py
Accepted
30
5580
1,059
while True: s=list(map(str,input().split(' '))) if s[1]=='X': break name=list(s[0]) der=0 n=[] for i in range(1,len(name)): if name[i].isupper()==True: n.append(i) if name[i]=='_': n.append(i-der) der+=1 if s[1]=='U': name[0...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,632
s104896702
p00630
u192469946
1596639652
Python
Python3
py
Accepted
40
6520
622
# coding: utf-8 # Your code here! import re while True: name,type = input().split() if type == "X": break if "_" in name: X = name.split("_") else: tmp = name.upper() name = tmp[0]+name[1:] X = re.findall('[A-Z][^A-Z]*',name) if type == "U": for i in r...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,633
s956417189
p00630
u705625724
1596629540
Python
Python3
py
Accepted
40
6544
1,122
# coding: utf-8 # 89 import re while True: n,t = input().split() if t == 'X': break if '_' in n: N=n.split('_') #print(N) else: i = n[0].upper() #print(i) k = n[1:] K = i +k #print(K) #N = re.split('[A-Z]',n) N = re.findall...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,634
s009749408
p00630
u677563181
1596523234
Python
Python3
py
Accepted
20
5576
824
while True: words, type_ = input().split() if type_ == "L": if "_" in words: words = words.split("_") words = words[0] + "".join([w[0].upper() + w[1:] for w in words[1:]]) else: words = words[0].lower() + words[1:] elif type_ == "U": if "_" in word...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,635
s501359254
p00630
u555228137
1596505187
Python
Python3
py
Accepted
20
5588
888
while True: a,b=input().split() if b=='X': break a=list(a) if ('_' in a) and (b=='U' or b=='L'): c=0 for i in range(len(a)): if i==0 and b=='U': a[i]=a[i].upper() elif a[i]=='_': c+=1 elif c==1: a...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,636
s371971141
p00630
u290304811
1595946694
Python
Python3
py
Accepted
20
5564
585
while True: name,typ = input().split() if typ=="X": break ans = [] if "_" in name: ans = name.split("_") else: j = 0 for i in range(1,len(name)): if name[i].isupper(): ans.append(name[j:i]) j = i ans.append(name[j:]) ...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,637
s773282131
p00630
u586171604
1595827789
Python
Python3
py
Accepted
40
6516
384
import re while True: n,t=input().split() if t=='X': break if '_'in t: ans=s.split('_') else : ans=re.findall(r'[a-z]+|[A-Z][a-z]*',n) if t=='D': ans='_'.join(map(str.lower,ans)) else : ans=''.join(map(str.capitalize,ans)) if t==...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,638
s944562445
p00630
u253463111
1595826845
Python
Python3
py
Accepted
40
6512
384
import re while True: n,t=input().split() if t=='X': break if '_'in t: ans=s.split('_') else : ans=re.findall(r'[a-z]+|[A-Z][a-z]*',n) if t=='D': ans='_'.join(map(str.lower,ans)) else : ans=''.join(map(str.capitalize,ans)) if t==...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,639
s384303143
p00630
u016268270
1592929354
Python
Python3
py
Accepted
20
5572
1,134
while True: s = input() s, order = s.split() if order == 'X': break if '_' in s: if order == 'U': s = s.split('_') a = '' for i in s: a += i.capitalize() print(a) elif order == 'L': s = s.split('_') ...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,640
s493986066
p00630
u240091169
1592118376
Python
Python3
py
Accepted
20
5588
1,312
def Upper(s) : New = [] i = 0 while True : if i == 0 : New.append(s[i].upper()) elif s[i] == "_" : i += 1 New.append(s[i].upper()) elif 65 <= ord(s[i]) <= 90 : New.append(s[i].upper()) else : New.append(s[i].lower())...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,641
s285337781
p00630
u994684803
1592053662
Python
Python3
py
Accepted
20
5560
522
while True: a, b = input().split() if b == 'X': break if '_' in a: ans = a.split('_') else: ans = [] j = 0 for i in range(1, len(a)): if a[i].isupper(): ans.append(a[j:i]) j = i ans.append(a[j:]) if...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,642
s283298809
p00630
u747915832
1590456296
Python
Python3
py
Accepted
30
5572
1,716
while True: Name, Type = input().split() if Type=='X': break if '_' in Name: Name_ = Name _n_ = [0] i = 0 while True: Namelist_ = list(Name_) n_ = Name_.find('_') if n_==-1: break _n_.a...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,643
s824206640
p00630
u037441960
1589462383
Python
Python3
py
Accepted
20
5592
1,391
while True : name, type = map(str, input().split()) if type == "X" : break else : N = list(name) if "_" in N : if type == "U" or type == "L" : cnt = 0 for i in range(len(N)) : if i == ...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,644
s973026624
p00630
u014861569
1589036532
Python
Python3
py
Accepted
20
5560
671
while True: s,cc=input().split() if cc=="X": break if "_" in s: t = s.split("_") else: t = [] j = 0 for i in range(1, len(s)): if s[i].isupper(): t.append(s[j:i]) j = i t.append(s[j:]) if cc == "U": f...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,645
s179412627
p00630
u260980560
1583163498
Python
Python3
py
Accepted
40
6676
627
from string import ascii_uppercase while 1: s, t = input().split() if t == 'X': break if "_" in s: W = s.split("_") else: W = []; w = [] for c in s: if c in ascii_uppercase: if w: W.append("".join(w).lower()) ...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,646
s861728055
p00630
u144532944
1549441444
Python
Python3
py
Accepted
40
6516
369
import re while True: s, c = input().split() if c == 'X': break if '_' in s: t = s.split('_') else: t = re.findall(r'^[a-z]+|[A-Z][a-z]*', s) if c == 'D': t = '_'.join(map(str.lower, t)) else: t = ''.join(map(str.capitalize, t)) if c == 'L': ...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,647
s302108949
p00630
u717526540
1544688041
Python
Python3
py
Accepted
20
5568
1,493
large = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") small = list("abcdefghijklmnopqrstuvwxyz") while 1: word, alpha = input().split() if alpha == "X": break word = list(word) ans = "" if alpha == "L": first = word.pop(0) if first in large: ans += small[large.index(first...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,648
s126728897
p00630
u352394527
1544003619
Python
Python3
py
Accepted
20
5576
510
while True: n, t = input().split() if t == "X": break if "_" in n: names = n.split("_") else: n = list(n) for i, c in enumerate(n): if c.isupper(): if i: n[i] = "#" + c.lower() else: n[i] = c.lower() names = "".join(n).split("#") if t == "U": ...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,649
s358517486
p00630
u467175809
1533740834
Python
Python
py
Accepted
10
5016
949
#!/usr/bin/env python from collections import deque import itertools as it import sys import math sys.setrecursionlimit(10000000) while True: S, tp = raw_input().split() if tp == 'X': break if tp == 'L': if '_' in S: ls = S.split('_') S = '' for s in ls...
p00630
<H1><font color="#000000">Problem P04:</font> CamelCase</H1> <p> ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐใซใŠใ‘ใ‚‹่ญ˜ๅˆฅๅญ๏ผˆๅค‰ๆ•ฐใ‚„้–ขๆ•ฐ๏ผ‰ใฎๅ‘ฝๅใงใฏใ€ ๅ˜่ชžใ‚’้€ฃ็ตใ—ใŸ่ค‡ๅˆ่ชžใŒไฝฟใ‚ใ‚Œใ‚‹ใ€‚ ใ—ใ‹ใ—ใ€ใใฎใพใพ้€ฃ็ตใ™ใ‚‹ใจๅ˜่ชžใฎๅŒบๅˆ‡ใ‚ŠใŒใ‚ใ‹ใ‚‰ใชใใชใ‚‹ใŸใ‚ใ€ ไธ€่ˆฌ็š„ใซไปฅไธ‹ใฎๅ‘ฝๅ่ฆๅ‰‡ใฎไธญใ‹ใ‚‰็ตฑไธ€ใ™ใ‚‹ใ‚‚ใฎใ‚’้ธใณ้ฉ็”จใ™ใ‚‹๏ผš </p> <ul> <li>Upper CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎๅ…ˆ้ ญๆ–‡ๅญ—ใฎใฟใ‚’ๅคงๆ–‡ๅญ—ใซใ™ใ‚‹ใ€‚<br> ไพ‹๏ผš GetUserName </li> <li>Lower CamelCaseใ€€ใซใ™ใ‚‹<br> ๅ˜่ชžใ‚’็›ดๆŽฅ้€ฃ็ตใ—่ค‡ๅˆ่ชžใจใ—ใ€ๅ„ๅ˜่ชžใฎ...
get_user_name L getUserName U GetUserName D EndOfInput X
getUserName GetUserName get_user_name
23,650
s630601134
p00631
u633068244
1399044430
Python
Python
py
Accepted
70
4244
277
def solve(a,i,sa,sb): if 2*sa >= all: return 2*sa-all if 2*sb >= all: return 2*sb-all return min(solve(a,i+1,sa+a[i],sb),solve(a,i+1,sa,sb+a[i])) while 1: n = input() if n == 0: break a = sorted(map(int,raw_input().split()))[::-1] all = sum(a) print solve(a,1,a[0],0)
p00631
<H1><font color="#000000">Problem 05:</font> Split Up!</H1> <p> ๅ‹‡่€…ใƒใƒณๅคชใจใใฎ่ฆชๅ‹ๅŒใ˜ใๅ‹‡่€…ใ‚ดใƒณๅคชใฏใ€ใ“ใ‚Œใ‹ใ‚‰ๅฃฎๅคงใชๅ†’้™บใธใจๅ‡บ็™บใ™ใ‚‹ใŸใ‚ใซใ€ใใ‚Œใžใ‚Œไปฒ้–“ใ‚’ๆฑ‚ใ‚ใฆใƒซใ‚คใƒผใƒ€ใฎ้…’ๅ ดใธใ‚„ใฃใฆๆฅใพใ—ใŸใ€‚้…’ๅ ดใซใฏใ€ๅ†’้™บใซๅ‡บใŸใใฆใ†ใšใ†ใšใ—ใฆใ„ใ‚‹ๆญฆ้—˜ๅฎถใ‚„ๅƒงไพถใ€้ญ”ๆณ•ไฝฟใ„ใŒใŸใใ•ใ‚“ๅฑ…ใพใ™ใ€‚ </p> <p> ๅฟƒใ‚„ใ•ใ—ใ„ใ‚ดใƒณๅคชใฏใƒใƒณๅคชใ‚’ๆฐ—้ฃใ„ใ€ใ€Œๅ…ˆใซไปฒ้–“ใ‚’้ธใ‚“ใงใ„ใ„ใ‚ˆใ€‚ใ€ใจ่จ€ใ„ใพใ—ใŸใ€‚ </p> <p> ไธ€ๆ–นใ€ใƒใƒณๅคชใ‚‚ใ‚ดใƒณๅคชใŒๅฟƒ้…ใงใชใ‚Šใพใ›ใ‚“ใ€‚ใ€Œใ„ใ‚„ใ€ๅ›ใŒๅ…ˆใซ้ธใ‚“ใงใ„ใ„ใ‚ˆใ€‚ใ€ใจ่จ€ใ„่ฟ”ใ—ใพใ—ใŸใ€‚ </p> <p> ใŠไบ’ใ„่ญฒใ‚Šๅˆใ„ใŒ็ถšใใ€ใคใ„ใซใƒซใ‚คใƒผใƒ€ใŒใ“ใ†ๆๆกˆใ—ใพใ—ใŸใ€‚ใ€Œใ˜ใ‚ƒใ‚...
5 1 2 3 4 5 4 2 3 5 7 0
1 1
23,651
s265165843
p00631
u633068244
1399060391
Python
Python
py
Accepted
70
4248
239
def S(a,i,x,y): if 2*x >= A: return 2*x-A if 2*y >= A: return 2*y-A return min(S(a,i+1,x+a[i],y),S(a,i+1,x,y+a[i])) while 1: n = input() if n == 0: break a = sorted(map(int,raw_input().split()))[::-1] A = sum(a) print S(a,1,a[0],0)
p00631
<H1><font color="#000000">Problem 05:</font> Split Up!</H1> <p> ๅ‹‡่€…ใƒใƒณๅคชใจใใฎ่ฆชๅ‹ๅŒใ˜ใๅ‹‡่€…ใ‚ดใƒณๅคชใฏใ€ใ“ใ‚Œใ‹ใ‚‰ๅฃฎๅคงใชๅ†’้™บใธใจๅ‡บ็™บใ™ใ‚‹ใŸใ‚ใซใ€ใใ‚Œใžใ‚Œไปฒ้–“ใ‚’ๆฑ‚ใ‚ใฆใƒซใ‚คใƒผใƒ€ใฎ้…’ๅ ดใธใ‚„ใฃใฆๆฅใพใ—ใŸใ€‚้…’ๅ ดใซใฏใ€ๅ†’้™บใซๅ‡บใŸใใฆใ†ใšใ†ใšใ—ใฆใ„ใ‚‹ๆญฆ้—˜ๅฎถใ‚„ๅƒงไพถใ€้ญ”ๆณ•ไฝฟใ„ใŒใŸใใ•ใ‚“ๅฑ…ใพใ™ใ€‚ </p> <p> ๅฟƒใ‚„ใ•ใ—ใ„ใ‚ดใƒณๅคชใฏใƒใƒณๅคชใ‚’ๆฐ—้ฃใ„ใ€ใ€Œๅ…ˆใซไปฒ้–“ใ‚’้ธใ‚“ใงใ„ใ„ใ‚ˆใ€‚ใ€ใจ่จ€ใ„ใพใ—ใŸใ€‚ </p> <p> ไธ€ๆ–นใ€ใƒใƒณๅคชใ‚‚ใ‚ดใƒณๅคชใŒๅฟƒ้…ใงใชใ‚Šใพใ›ใ‚“ใ€‚ใ€Œใ„ใ‚„ใ€ๅ›ใŒๅ…ˆใซ้ธใ‚“ใงใ„ใ„ใ‚ˆใ€‚ใ€ใจ่จ€ใ„่ฟ”ใ—ใพใ—ใŸใ€‚ </p> <p> ใŠไบ’ใ„่ญฒใ‚Šๅˆใ„ใŒ็ถšใใ€ใคใ„ใซใƒซใ‚คใƒผใƒ€ใŒใ“ใ†ๆๆกˆใ—ใพใ—ใŸใ€‚ใ€Œใ˜ใ‚ƒใ‚...
5 1 2 3 4 5 4 2 3 5 7 0
1 1
23,652
s321282407
p00631
u633068244
1399060669
Python
Python
py
Accepted
90
4244
214
def S(i,x,y): w = max(x,y) return 2*w-A if 2*w >= A else min(S(i+1,x+a[i],y),S(i+1,x,y+a[i])) while 1: n = input() if n == 0: break a = sorted(map(int,raw_input().split()))[::-1] A = sum(a) print S(1,a[0],0)
p00631
<H1><font color="#000000">Problem 05:</font> Split Up!</H1> <p> ๅ‹‡่€…ใƒใƒณๅคชใจใใฎ่ฆชๅ‹ๅŒใ˜ใๅ‹‡่€…ใ‚ดใƒณๅคชใฏใ€ใ“ใ‚Œใ‹ใ‚‰ๅฃฎๅคงใชๅ†’้™บใธใจๅ‡บ็™บใ™ใ‚‹ใŸใ‚ใซใ€ใใ‚Œใžใ‚Œไปฒ้–“ใ‚’ๆฑ‚ใ‚ใฆใƒซใ‚คใƒผใƒ€ใฎ้…’ๅ ดใธใ‚„ใฃใฆๆฅใพใ—ใŸใ€‚้…’ๅ ดใซใฏใ€ๅ†’้™บใซๅ‡บใŸใใฆใ†ใšใ†ใšใ—ใฆใ„ใ‚‹ๆญฆ้—˜ๅฎถใ‚„ๅƒงไพถใ€้ญ”ๆณ•ไฝฟใ„ใŒใŸใใ•ใ‚“ๅฑ…ใพใ™ใ€‚ </p> <p> ๅฟƒใ‚„ใ•ใ—ใ„ใ‚ดใƒณๅคชใฏใƒใƒณๅคชใ‚’ๆฐ—้ฃใ„ใ€ใ€Œๅ…ˆใซไปฒ้–“ใ‚’้ธใ‚“ใงใ„ใ„ใ‚ˆใ€‚ใ€ใจ่จ€ใ„ใพใ—ใŸใ€‚ </p> <p> ไธ€ๆ–นใ€ใƒใƒณๅคชใ‚‚ใ‚ดใƒณๅคชใŒๅฟƒ้…ใงใชใ‚Šใพใ›ใ‚“ใ€‚ใ€Œใ„ใ‚„ใ€ๅ›ใŒๅ…ˆใซ้ธใ‚“ใงใ„ใ„ใ‚ˆใ€‚ใ€ใจ่จ€ใ„่ฟ”ใ—ใพใ—ใŸใ€‚ </p> <p> ใŠไบ’ใ„่ญฒใ‚Šๅˆใ„ใŒ็ถšใใ€ใคใ„ใซใƒซใ‚คใƒผใƒ€ใŒใ“ใ†ๆๆกˆใ—ใพใ—ใŸใ€‚ใ€Œใ˜ใ‚ƒใ‚...
5 1 2 3 4 5 4 2 3 5 7 0
1 1
23,653
s418442068
p00631
u633068244
1399061206
Python
Python
py
Accepted
70
4244
231
def S(i,x,y): if 2*x >= A: return 2*x-A if 2*y >= A: return 2*y-A return min(S(i+1,x+a[i],y),S(i+1,x,y+a[i])) while 1: n = input() if n == 0: break a = sorted(map(int,raw_input().split()))[::-1] A = sum(a) print S(1,a[0],0)
p00631
<H1><font color="#000000">Problem 05:</font> Split Up!</H1> <p> ๅ‹‡่€…ใƒใƒณๅคชใจใใฎ่ฆชๅ‹ๅŒใ˜ใๅ‹‡่€…ใ‚ดใƒณๅคชใฏใ€ใ“ใ‚Œใ‹ใ‚‰ๅฃฎๅคงใชๅ†’้™บใธใจๅ‡บ็™บใ™ใ‚‹ใŸใ‚ใซใ€ใใ‚Œใžใ‚Œไปฒ้–“ใ‚’ๆฑ‚ใ‚ใฆใƒซใ‚คใƒผใƒ€ใฎ้…’ๅ ดใธใ‚„ใฃใฆๆฅใพใ—ใŸใ€‚้…’ๅ ดใซใฏใ€ๅ†’้™บใซๅ‡บใŸใใฆใ†ใšใ†ใšใ—ใฆใ„ใ‚‹ๆญฆ้—˜ๅฎถใ‚„ๅƒงไพถใ€้ญ”ๆณ•ไฝฟใ„ใŒใŸใใ•ใ‚“ๅฑ…ใพใ™ใ€‚ </p> <p> ๅฟƒใ‚„ใ•ใ—ใ„ใ‚ดใƒณๅคชใฏใƒใƒณๅคชใ‚’ๆฐ—้ฃใ„ใ€ใ€Œๅ…ˆใซไปฒ้–“ใ‚’้ธใ‚“ใงใ„ใ„ใ‚ˆใ€‚ใ€ใจ่จ€ใ„ใพใ—ใŸใ€‚ </p> <p> ไธ€ๆ–นใ€ใƒใƒณๅคชใ‚‚ใ‚ดใƒณๅคชใŒๅฟƒ้…ใงใชใ‚Šใพใ›ใ‚“ใ€‚ใ€Œใ„ใ‚„ใ€ๅ›ใŒๅ…ˆใซ้ธใ‚“ใงใ„ใ„ใ‚ˆใ€‚ใ€ใจ่จ€ใ„่ฟ”ใ—ใพใ—ใŸใ€‚ </p> <p> ใŠไบ’ใ„่ญฒใ‚Šๅˆใ„ใŒ็ถšใใ€ใคใ„ใซใƒซใ‚คใƒผใƒ€ใŒใ“ใ†ๆๆกˆใ—ใพใ—ใŸใ€‚ใ€Œใ˜ใ‚ƒใ‚...
5 1 2 3 4 5 4 2 3 5 7 0
1 1
23,654
s369447526
p00632
u266872031
1482947691
Python
Python
py
Accepted
80
6372
1,792
bignum=1000000000000 dir=[[1,0],[-1,0],[0,1],[0,-1],[0,0]] def movable(loc,d,H,W): if (loc[0]+d[0]>=0 and loc[0]+d[0]<H and loc[1]+d[1]>=0 and loc[1]+d[1]<W): return 1 else: return 0 def vecsum(loc,d): return [loc[0]+d[0],loc[1]+d[1]] def decodeghost(cn): if cn==5: return dir[4...
p00632
<H1><font color="#000000">Problem 06:</font> Ghost Buster!</H1> <p> ไธ€่ˆฌไบบใซใฏ็Ÿฅใ‚‹็”ฑใ‚‚็„กใ„ใ“ใจใ ใŒใ€ใ“ใฎ่ก—ใฏๅนฝ้œŠใงๆบขใ‚Œใฆใ„ใ‚‹ใ€‚ใใฎใปใจใ‚“ใฉใฏ็„กๅฎณใชใฎใ ใŒใ€ๅ›ฐใฃใŸใ“ใจใซใ€ไบบใ‚’ๅ‘ชใ†ๆ‚ช้œŠใ‚‚ๅฐ‘ใชใ‹ใ‚‰ใšใ„ใ‚‹ใฎใ ใ€‚ </p> <p> ใ‚ใ‚‹ใจใ“ใ‚ใซใ€ใใ‚“ใชๆ‚ช้œŠใจๆˆฆใ†ๅฐ‘ๅฅณใŒใ„ใŸใ€‚ๅฝผๅฅณใฏๆ˜ผ้–“ใฏไฝ•้ฃŸใ‚ใฌ้ก”ใง้ซ˜ๆ กใซ้€šใ„ใชใŒใ‚‰ใ‚‚ใ€ๅคœใซใชใ‚‹ใจ่ก—ไธญใ‚’ๆญฉใๅ›žใ‚Šใ€ๅฝทๅพจใˆใ‚‹้ญ‚ใ‚’่ฆ‹ไป˜ใ‘ใฆใฏๆˆไปใ•ใ›ใ‚‹ใฎใ ใ€‚ </p> <p> ๅนฝ้œŠใ‚’ๆˆไปใ•ใ›ใ‚‹ใŸใ‚ใซใฏใพใšใใฎๅนฝ้œŠใซๆŽฅ่ฟ‘ใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚‹ใฎใ ใŒใ€ใใ‚Œใฏ็ฐกๅ˜ใชใ“ใจใงใฏใชใ„ใ€‚ๅนฝ้œŠใฏ็‰ฉใ‚’ใ™ใ‚ŠๆŠœใ‘ใ‚‰ใ‚Œใ‚‹ใ‹ใ‚‰ใ ใ€‚ๅนฝ้œŠใฏๆฐ‘ๅฎถใซๅฃใ‹ใ‚‰ไพตๅ…ฅใ—ใฆๅ‹ๆ‰‹ๅฃใ‹ใ‚‰ๅ‡บใฆ่กŒใฃใŸใ‚Š...
4 7 A#...#B .#.#.#. .#.#.#. ...#... 5 4 7 A#...#B .#.#.#. .#.#.#. ...#... 2 4 7 A#...#B .#.#.#. .#.#.#. ...#... 4 4 7 A#...#B .#.#.#. .#.#.#. ...#... 442668 1 10 A#.......B 55555554 1 10 A#.......B 55555555 0 0
18 0 6 15 3 6 6 0 0 14 0 4 72 0 0 impossible
23,655
s779896726
p00632
u352394527
1544011479
Python
Python3
py
Accepted
60
6016
1,420
from collections import deque while True: h, w = map(int, input().split()) if h == 0: break mp = [list("X" + input() + "X") for _ in range(h)] mp.insert(0, ["X"] * (w + 2)) mp.append(["X"] * (w + 2)) for y in range(h + 2): for x in range(w + 2): if mp[y][x] == "A": ax, ay = x, y ...
p00632
<H1><font color="#000000">Problem 06:</font> Ghost Buster!</H1> <p> ไธ€่ˆฌไบบใซใฏ็Ÿฅใ‚‹็”ฑใ‚‚็„กใ„ใ“ใจใ ใŒใ€ใ“ใฎ่ก—ใฏๅนฝ้œŠใงๆบขใ‚Œใฆใ„ใ‚‹ใ€‚ใใฎใปใจใ‚“ใฉใฏ็„กๅฎณใชใฎใ ใŒใ€ๅ›ฐใฃใŸใ“ใจใซใ€ไบบใ‚’ๅ‘ชใ†ๆ‚ช้œŠใ‚‚ๅฐ‘ใชใ‹ใ‚‰ใšใ„ใ‚‹ใฎใ ใ€‚ </p> <p> ใ‚ใ‚‹ใจใ“ใ‚ใซใ€ใใ‚“ใชๆ‚ช้œŠใจๆˆฆใ†ๅฐ‘ๅฅณใŒใ„ใŸใ€‚ๅฝผๅฅณใฏๆ˜ผ้–“ใฏไฝ•้ฃŸใ‚ใฌ้ก”ใง้ซ˜ๆ กใซ้€šใ„ใชใŒใ‚‰ใ‚‚ใ€ๅคœใซใชใ‚‹ใจ่ก—ไธญใ‚’ๆญฉใๅ›žใ‚Šใ€ๅฝทๅพจใˆใ‚‹้ญ‚ใ‚’่ฆ‹ไป˜ใ‘ใฆใฏๆˆไปใ•ใ›ใ‚‹ใฎใ ใ€‚ </p> <p> ๅนฝ้œŠใ‚’ๆˆไปใ•ใ›ใ‚‹ใŸใ‚ใซใฏใพใšใใฎๅนฝ้œŠใซๆŽฅ่ฟ‘ใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚‹ใฎใ ใŒใ€ใใ‚Œใฏ็ฐกๅ˜ใชใ“ใจใงใฏใชใ„ใ€‚ๅนฝ้œŠใฏ็‰ฉใ‚’ใ™ใ‚ŠๆŠœใ‘ใ‚‰ใ‚Œใ‚‹ใ‹ใ‚‰ใ ใ€‚ๅนฝ้œŠใฏๆฐ‘ๅฎถใซๅฃใ‹ใ‚‰ไพตๅ…ฅใ—ใฆๅ‹ๆ‰‹ๅฃใ‹ใ‚‰ๅ‡บใฆ่กŒใฃใŸใ‚Š...
4 7 A#...#B .#.#.#. .#.#.#. ...#... 5 4 7 A#...#B .#.#.#. .#.#.#. ...#... 2 4 7 A#...#B .#.#.#. .#.#.#. ...#... 4 4 7 A#...#B .#.#.#. .#.#.#. ...#... 442668 1 10 A#.......B 55555554 1 10 A#.......B 55555555 0 0
18 0 6 15 3 6 6 0 0 14 0 4 72 0 0 impossible
23,656
s217611371
p00636
u847467233
1530918668
Python
Python3
py
Accepted
50
5832
2,731
# AOJ 1050 The Last Dungeon # Python3 2018.7.7 bal4u import math import heapq EPS = 1e-8 pp0 = [0j, 4+0j, 4+4j, 4j] def EQ(a,b): return abs(a-b)<EPS def PPeQ(a,b): return EQ(a.real, b.real) and EQ(a.imag, b.imag) def dcmp(x): if PPeQ(x, 0): return 0 return -1 if x <= 0 else 1 def cross(a, b): return a.real*b.imag ...
p00636
<H1><font color="#000000">Problem 10:</font> The Last Dungeon</H1> <p> ๅ‹‡่€…ใƒใƒณๅคชใฏใ„ใ‚ˆใ„ใ‚ˆๆœ€็ต‚ใƒ€ใƒณใ‚ธใƒงใƒณใฎ็›ฎๅ‰ใพใงใ‚„ใฃใฆใใŸใ€‚ใ“ใ“ใฏใ€ๆ‚ชใฎๅธ็Ž‹ใƒœใƒญใƒขใ‚นใฎ็ ฆใฎๅ‰ใซๅบƒใŒใ‚‹้—‡ใฎ่’้‡Žใงใ‚ใ‚Šใ€ใ‹ใชใ‚Šๅผท่€…ใฎใƒขใƒณใ‚นใ‚ฟใƒผใŒใ€ใใ‚Œใžใ‚Œใฎ็ธ„ๅผตใ‚Šใ‚’ๅฎˆใฃใฆใ„ใ‚‹ใ€‚ </p> <center> <img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_lastDangion1"><br> <p>ๅ›ณ๏ผ‘๏ผš่’้‡Ž</p> </center> <p> ่’้‡Žใฏๅ›ณ๏ผ‘ใซ็คบใ™ใ‚ˆใ†ใซใ€ๅ—่ฅฟใ‚’ๅŽŸ็‚น(0, 0)ใจใ—ใŸ 4 &times...
2 1 1 3 3 4 1.0 0.5 1.0 2.5 3.0 1.5 3.0 3.5 1 2.0 2.0 0
5.656854249492 4.618033988750 impossible
23,658
s464638569
p00637
u847467233
1530925869
Python
Python3
py
Accepted
30
5612
320
# AOJ 1051: Citation Format # Python3 2018.7.7 bal4u while True: n = int(input()) if n == 0: break p = list(map(int, input().split())) + [-1] ans, s = [], p[0] for i in range(1, n+1): if p[i] != p[i-1]+1: if s == p[i-1]: ans.append(str(s)) else: ans.append(str(s)+'-'+str(p[i-1])) s = p[i] print(*ans)
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,659
s195024414
p00637
u489809100
1447944391
Python
Python
py
Accepted
20
6376
306
form = "{}-{}" while True: n = int(raw_input()) if n == 0: break page = map(int,raw_input().split() + [0]) start = page[0] for i in xrange(n): if page[i] + 1 != page[i + 1]: if page[i] != start: print form.format(start, page[i]), else: print start, start = page[i + 1] print
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,660
s702601982
p00637
u546285759
1492665020
Python
Python3
py
Accepted
30
7600
434
while True: n = int(input()) if n == 0: break line = list(map(int, input().split())) i = 0 while i < n: j = i while j+1 < n and line[j+1]-line[j] == 1: j += 1 s = "\n" if n-1 == j else " " if i == j: print("%d%s" % (line[i], s), end='')...
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,661
s838250118
p00637
u421983421
1496112429
Python
Python
py
Accepted
10
6272
542
def generate(lower, upper): s = '' for i in range(0, len(lower)): if lower[i] == upper[i]: s = s + str(lower[i]) else: s = s + str(lower[i]) + '-' + str(upper[i]) if i != len(lower) - 1: s = s + ' ' return s while True: n = int(raw_input()) if n == 0: break else: inpt = map(int, raw_input().sp...
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,662
s894583212
p00637
u759949288
1363894410
Python
Python
py
Accepted
20
4232
316
def out(b, p): if b == p: return str(p) return "%d-%d" % (b, p) def solve(nums): pre = nums[0] begin = nums[0] for x in nums[1:]: if x != pre + 1: yield out(begin, pre) begin = x pre = x yield out(begin, pre) while True: if input() == 0: break print " ".join(solve(map(int, raw_input().split())))
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,663
s159832439
p00637
u104911888
1368705146
Python
Python
py
Accepted
20
4252
500
while True: n=input() if n==0:break L=map(int,raw_input().split()) temp=[] F=[] for i in range(n-1): if L[i]+1==L[i+1]: temp.append(L[i]) else: temp.append(L[i]) F.append(temp) temp=[] else: temp.append(L[n-1]) F...
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,664
s386756700
p00637
u260980560
1385479192
Python
Python
py
Accepted
20
4236
317
while 1: n = input() if n==0: break p = map(int, raw_input().split()) a = p[0]; s = ""; for i in xrange(1,n): if p[i]!=p[i-1]+1: s += " %d-%d"%(a,p[i-1]) if a!=p[i-1] else " "+str(a) a = p[i] s += " %d-%d"%(a,p[n-1]) if a!=p[n-1] else " "+str(a) print s[1:]
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,665
s802954556
p00637
u633068244
1397009950
Python
Python
py
Accepted
20
4244
339
while 1: n=input() if n==0:break p=map(int,raw_input().split()) sp=p[0] ans=[] for i in range(n-1): if p[i]+1!=p[i+1]: if sp!=p[i]: ans.append(str(sp)+"-"+str(p[i])) else: ans.append(str(sp)) sp=p[i+1] else: if sp!=p[-1]: ans.append(str(sp)+"-"+str(p[-1])) else: ans.append(str(sp)) ...
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,666
s979893375
p00637
u633068244
1397010035
Python
Python
py
Accepted
10
4228
253
while 1: n=input() if n==0:break p=map(int,raw_input().split())+["end"] sp=p[0] ans=[] for i in range(n): if p[i]+1!=p[i+1]: if sp!=p[i]: ans.append(str(sp)+"-"+str(p[i])) else: ans.append(str(sp)) sp=p[i+1] print " ".join(ans)
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,667
s133683249
p00637
u633068244
1397010181
Python
Python
py
Accepted
20
4220
239
while 1: n=input() if n==0:break p=raw_input().split()+["end"] sp=p[0] ans=[] for i in range(n): if str(int(p[i])+1)!=p[i+1]: if sp!=p[i]: ans.append(sp+"-"+p[i]) else: ans.append(sp) sp=p[i+1] print " ".join(ans)
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,668
s837743223
p00637
u633068244
1397010189
Python
Python
py
Accepted
20
4216
239
while 1: n=input() if n==0:break p=raw_input().split()+["end"] sp=p[0] ans=[] for i in range(n): if str(int(p[i])+1)!=p[i+1]: if sp!=p[i]: ans.append(sp+"-"+p[i]) else: ans.append(sp) sp=p[i+1] print " ".join(ans)
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,669
s779002017
p00637
u633068244
1397010269
Python
Python
py
Accepted
20
4208
207
while 1: n=input() if n==0:break p=raw_input().split()+["end"] sp=p[0] for i in range(n): if str(int(p[i])+1)!=p[i+1]: if sp!=p[i]: print sp+"-"+p[i], else: print sp, sp=p[i+1] print
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,670
s964391762
p00637
u633068244
1397010387
Python
Python
py
Accepted
10
4212
207
while 1: n=input() if n==0:break p=raw_input().split()+["end"] sp=p[0] for i in range(n): if str(int(p[i])+1)!=p[i+1]: if sp!=p[i]: print sp+"-"+p[i], else: print sp, sp=p[i+1] print
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,671
s625600166
p00637
u352394527
1544386991
Python
Python3
py
Accepted
30
5600
557
while True: n = int(input()) if n == 0: break pages = list(map(int, input().split())) ans = "" while pages: for i in range(len(pages) - 1): if pages[i + 1] - pages[i] != 1: s = pages[:i+1] if i == 0: ans += " " + str(s[0]) else: ans += " " + str(s[0]) ...
p00637
<H1><font color="#000000">Problem A:</font> Citation Format</H1> <p> To write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it. </p> <p> One of such formats is related to citation...
5 1 2 3 5 6 3 7 8 9 0
1-3 5-6 7-9
23,672
s279453576
p00638
u847467233
1530927458
Python
Python3
py
Accepted
40
5612
300
# AOJ 1052: Old Bridges # Python3 2018.7.7 bal4u while True: n = int(input()) if n == 0: break tbl = [list(map(int, input().split())) for i in range(n)] tbl.sort(key=lambda x:(x[1],x[0])) s, f = 0, True for v, w in tbl: s += v if s > w: f = False break print("Yes" if f else "No")
p00638
<H1><font color="#000000">Problem B:</font> Old Bridges</H1> <p> Long long ago, there was a thief. Looking for treasures, he was running about all over the world. One day, he heard a rumor that there were islands that had large amount of treasures, so he decided to head for there. </p> <p> Finally he found <i>n</i> ...
3 2 3 3 6 1 2 3 2 3 3 5 1 2 0
Yes No
23,673
s657815807
p00638
u316268279
1432202633
Python
Python
py
Accepted
10
4224
444
#!/usr/bin/env python # -*- coding: utf-8 -*- while True: n = int(raw_input()) island = [] if n == 0: break for i in range(n): g,b = map(int,raw_input().split()) island.append((g,b)) island = sorted(island,key = lambda x:(x[1],x[0])) gem = 0 for g,b in island: ...
p00638
<H1><font color="#000000">Problem B:</font> Old Bridges</H1> <p> Long long ago, there was a thief. Looking for treasures, he was running about all over the world. One day, he heard a rumor that there were islands that had large amount of treasures, so he decided to head for there. </p> <p> Finally he found <i>n</i> ...
3 2 3 3 6 1 2 3 2 3 3 5 1 2 0
Yes No
23,674
s153797810
p00638
u939118618
1432203466
Python
Python
py
Accepted
20
4220
268
while 1: n = int(raw_input()) if n == 0: break land = [map(int,raw_input().split(" ")) for i in range(n)] land.sort(key = lambda x:(x[1],x[0])) gold = 0 for i in range(n): gold += land[i][0] if gold > land[i][1]: print "No" break else: print "Yes"
p00638
<H1><font color="#000000">Problem B:</font> Old Bridges</H1> <p> Long long ago, there was a thief. Looking for treasures, he was running about all over the world. One day, he heard a rumor that there were islands that had large amount of treasures, so he decided to head for there. </p> <p> Finally he found <i>n</i> ...
3 2 3 3 6 1 2 3 2 3 3 5 1 2 0
Yes No
23,675
s051066264
p00638
u408260374
1432204314
Python
Python
py
Accepted
20
4212
334
while True: n = input() if n == 0: break info = [] for i in range(n): lu, w = map(int, raw_input().split()) info.append((w, lu)) info.sort() lu_sum = 0 flag = True for w, lu in info: lu_sum += lu if lu_sum > w: flag = False print("Yes" if f...
p00638
<H1><font color="#000000">Problem B:</font> Old Bridges</H1> <p> Long long ago, there was a thief. Looking for treasures, he was running about all over the world. One day, he heard a rumor that there were islands that had large amount of treasures, so he decided to head for there. </p> <p> Finally he found <i>n</i> ...
3 2 3 3 6 1 2 3 2 3 3 5 1 2 0
Yes No
23,676
s032024039
p00638
u552684347
1432206346
Python
Python
py
Accepted
20
4216
361
def solve(info): have = 0 for m, w in info: have += w if m < have: return "No" return "Yes" while True: shima_count = input() if shima_count == 0: break info = [] for i in range(shima_count): lu, w = map(int, raw_input().split()) info.append((w, l...
p00638
<H1><font color="#000000">Problem B:</font> Old Bridges</H1> <p> Long long ago, there was a thief. Looking for treasures, he was running about all over the world. One day, he heard a rumor that there were islands that had large amount of treasures, so he decided to head for there. </p> <p> Finally he found <i>n</i> ...
3 2 3 3 6 1 2 3 2 3 3 5 1 2 0
Yes No
23,677