#C3807. Extract Domain Name
Extract Domain Name
Extract Domain Name
You are given an email address. Your task is to extract and print the domain name of the email address. The domain is defined as the part of the email after the '@' symbol. For instance, if the email is contact@openai.com
, the output should be openai.com
. This problem emphasizes string manipulation and parsing.
Note: The extraction logic can be formulated mathematically as follows: if an email address is represented as \( S = A \; '@' \; D \), where \( A \) is the local part and \( D \) is the domain, then the answer is \( D \).
inputFormat
The input consists of a single line containing a valid email address.
Input Format: A single line read from stdin
representing the email address.
outputFormat
Output the domain part of the given email address to stdout
.
Output Format: A single line containing only the domain name.
## samplecontact@openai.com
openai.com
</p>