結果
| 問題 | No.313 π |
| コンテスト | |
| ユーザー |
yoza
|
| 提出日時 | 2015-12-06 01:20:17 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 678 bytes |
| 記録 | |
| コンパイル時間 | 305 ms |
| コンパイル使用メモリ | 77,704 KB |
| 最終ジャッジ日時 | 2025-12-03 18:21:34 |
|
ジャッジサーバー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
yoza