| t | import sys | t | import sys |
| import zipfile | | import zipfile |
| import io | | import io |
| | | |
| def main(): | | def main(): |
| data = sys.stdin.read() | | data = sys.stdin.read() |
| hex_str = ''.join(data.split()) | | hex_str = ''.join(data.split()) |
| try: | | try: |
| bytes_data = bytes.fromhex(hex_str) | | bytes_data = bytes.fromhex(hex_str) |
| except Exception: | | except Exception: |
| print('0 0') | | print('0 0') |
| return | | return |
| try: | | try: |
| with zipfile.ZipFile(io.BytesIO(bytes_data), 'r') as zf: | | with zipfile.ZipFile(io.BytesIO(bytes_data), 'r') as zf: |
| total_size = 0 | | total_size = 0 |
| count = 0 | | count = 0 |
| for info in zf.infolist(): | | for info in zf.infolist(): |
| if not info.is_dir(): | | if not info.is_dir(): |
| count += 1 | | count += 1 |
| total_size += info.file_size | | total_size += info.file_size |
| print(count, total_size) | | print(count, total_size) |
| except Exception: | | except Exception: |
| print('0 0') | | print('0 0') |
| if __name__ == '__main__': | | if __name__ == '__main__': |
| main() | | main() |