⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
__pycache__
/
View File Name :
roman.cpython-310.pyc
o "*_P @ s d dl mZ dZdZdZdZd dlZd dlZd dlZd dl Z G dd de ZG d d d eZG dd deZ G d d deZdZdd ZedejZdd Zdd Zdd Zedkrde e dS dS ) )print_functionz&Mark Pilgrim (f8dy@diveintopython.org)z1.4z 8 August 2001ag Copyright (c) 2001 Mark Pilgrim This program is part of "Dive Into Python", a free Python tutorial for experienced programmers. Visit http://diveintopython.org/ for the latest version. This program is free software; you can redistribute it and/or modify it under the terms of the Python 2.1.1 license, available at http://www.python.org/2.1.1/license.html Nc @ e Zd ZdS ) RomanErrorN__name__ __module____qualname__ r r '/usr/lib/python3/dist-packages/roman.pyr r c @ r )OutOfRangeErrorNr r r r r r r r c @ r )NotIntegerErrorNr r r r r r # r r c @ r )InvalidRomanNumeralErrorNr r r r r r ' r r ) )Mi )CMi )Di )CDi )Cd )XCZ )L2 )XL( )X )IX )V )IV )I c C sx t | ts tdd| k rdk std td| dkr!dS d}tD ]\}}| |kr9||7 }| |8 } | |ks-q%|S )z convert integer to Roman numeralzdecimals can not be convertedi z%number out of range (must be 0..4999)r N ) isinstanceintr r romanNumeralMap)nresultnumeralintegerr r r toRoman; s r/ a8 ^ # beginning of string M{0,4} # thousands - 0 to 4 M's (CM|CD|D?C{0,3}) # hundreds - 900 (CM), 400 (CD), 0-300 (0 to 3 C's), # or 500-800 (D, followed by 0 to 3 C's) (XC|XL|L?X{0,3}) # tens - 90 (XC), 40 (XL), 0-30 (0 to 3 X's), # or 50-80 (L, followed by 0 to 3 X's) (IX|IV|V?I{0,3}) # ones - 9 (IX), 4 (IV), 0-3 (0 to 3 I's), # or 5-8 (V, followed by 0 to 3 I's) $ # end of string c C s | st d| dkrdS t| st d| d}d}tD ]&\}}| ||t| |krC||7 }|t|7 }| ||t| |ks-q|S )z convert Roman numeral to integerzInput can not be blankr&