βshortの自堕落Diary

web関係や、プログラミングなどを扱う予定です。プランなど立てていないので、不定期投稿になります。

AOJ ITP1_3

AOJ ITP1_3

ITP1_3_A:Print Many Hello World

for i in range(1000):
    print("Hello World")

ITP1_3_B:Print Test Cases

c=1
while True:
    s=input()
    if s=='0':
        break
    else:
        print("Case "+str(c)+": "+s)
    c=c+1

ITP1_3_C:Swapping Two Numbers

出力は合っているはずなのに、エラー出てしまう。
何が違うのか・・・

while True:
    s=input().rstrip().split()
    s.sort()
    if (s[0]=='0') & (s[1]=='0'):
        break
    print(s[0]+" "+s[1])

ITP1_3_D:How Many Divisors?

考え中