結果
問題 |
No.313 π
|
ユーザー |
![]() |
提出日時 | 2015-12-06 01:20:17 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 678 bytes |
コンパイル時間 | 156 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 10,368 KB |
最終ジャッジ日時 | 2024-09-14 14:59:38 |
合計ジャッジ時間 | 2,349 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 32 |
ソースコード
from HTMLParser import HTMLParser from urllib import urlopen s = raw_input() class PiParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.pre = False def handle_starttag(self, tag, attrs): if tag == 'pre': self.pre = True def handle_endtag(self, tag): self.pre = False def handle_data(self, data): if self.pre: self.pi = data.replace('\n', '') parser = PiParser() url = urlopen('http://www.eveandersson.com/pi/digits/1000000') html = url.read() parser.feed(html) parser.close() for (a, b) in zip(s, parser.pi): if a != b: print("%s %s" % (a, b)) break