ZipInfo/ziptitap | ZipInfo/VoMaKu | ||||
---|---|---|---|---|---|
n | 1 | import io | n | ||
2 | import sys | 1 | import sys | ||
n | 3 | from zipfile import ZipFile | n | 2 | import zipfile |
3 | from io import BytesIO as BTSIO | ||||
4 | zp = ZipFile(io.BytesIO(bytes.fromhex(sys.stdin.read())), 'r') | 4 | zipf = zipfile.ZipFile(BTSIO(bytes.fromhex(sys.stdin.read())), 'r') | ||
5 | (count, size) = (0, 0) | 5 | (count, volume) = (0, 0) | ||
6 | for el in zp.infolist(): | 6 | for line in zipf.infolist(): | ||
7 | if not el.is_dir(): | 7 | if not line.is_dir(): | ||
8 | count += 1 | 8 | count += 1 | ||
t | 9 | size += el.file_size | t | 9 | volume += line.file_size |
10 | print(count, size) | 10 | print(count, volume) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|