ZipInfo/Agafonova525 | ZipInfo/hedayra | ||||
---|---|---|---|---|---|
t | 1 | import sys | t | 1 | import sys |
2 | import io | 2 | import io | ||
3 | import zipfile | 3 | import zipfile | ||
4 | 4 | ||||
5 | sum = 0 | 5 | sum = 0 | ||
6 | cnt = 0 | 6 | cnt = 0 | ||
7 | for zinfo in zipfile.ZipFile( | 7 | for zinfo in zipfile.ZipFile( | ||
8 | io.BytesIO( | 8 | io.BytesIO( | ||
9 | bytes.fromhex( | 9 | bytes.fromhex( | ||
10 | sys.stdin.read()))).filelist: | 10 | sys.stdin.read()))).filelist: | ||
11 | sum += zinfo.file_size | 11 | sum += zinfo.file_size | ||
12 | cnt += 0 if zinfo.is_dir() else 1 | 12 | cnt += 0 if zinfo.is_dir() else 1 | ||
13 | 13 | ||||
14 | print(cnt, sum) | 14 | print(cnt, sum) | ||
15 | 15 |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|