2011-05-01から1ヶ月間の記事一覧

先生とユリィカとりんご算

かんたんかんたん? 54. Julka Problem code: JULKAJulka surprised her teacher at preschool by solving the following riddle: ユリィカが算数クイズをとても早く解くのを見て、幼稚園の先生は驚きました。その算数クイズがこちらです;Klaudia and Natal…

裏向き数字の足し算をPythonで

書けた。 #!/usr/bin/env python # -*- coding: utf-8 -*- numberOfCase = input(); #何組の数字が入ってくるのか L=[] #入ってきた数字を入れるリスト for i in range(numberOfCase): i = raw_input() L.append(i.split(" ")) def makeReverse(revNum): #裏…

https://www.spoj.pl/problems/ADDREV/ 問題文を翻訳。 42. Adding Reversed Numbers/裏向き数字の足し算 The Antique Comedians of Malidinesia prefer comedies to tragedies. Unfortunately, most of the ancient plays are tragedies. Therefore the dra…

素数を求めよ

https://www.spoj.pl/problems/PRIME1/を考えてた。 Pythonで提出できるから、いちど書いてから、もういちど書き直したのがこれ。 けっこう綺麗にかけた? #!/usr/bin/env python import math def main(): t=input() #何組の数字が入ってくるのか L=[] #最大…