luogu#P9712. 「QFOI R1」贴贴

「QFOI R1」贴贴

Problem Description

Little R is a cute girl. She hopes to get closer to the problem setter by writing solution posts for Luogu problems.

She发现 that if she clicks the "Submit Solution" button on the solution page, the blog will automatically generate a URL identifier, which is the link to the post.

The identifier is generated by the following rules:

  • Convert all uppercase letters in the problem ID to lowercase.
  • Replace all underscores in the result of the previous step with hyphens.
  • Add solution- in front of the result of the previous step.

She is going to write a solution for a problem. Given the problem ID, can you compute the URL identifier?

Input Format

One line, a string ss, representing the problem ID.

Output Format

One line, a string, representing the URL identifier.

P9202
solution-p9202
CF1797F
solution-cf1797f
AT_abc312_h
solution-at-abc312-h

Hint

Explanation for Sample 33

According to the generation rules:

  • Convert all uppercase letters in the problem ID to lowercase: at_abc312_h.
  • Replace all underscores in the result of the previous step with hyphens: at-abc312-h.
  • Add solution- in front of the result of the previous step: solution-at-abc312-h.

Constraints

This problem has 1010 test points, and each test point is worth 1010 points.

For all data, the problem ID is guaranteed to contain only uppercase letters (ASCII 659065\sim 90), lowercase letters (ASCII 9712297\sim 122), digits (ASCII 485748\sim 57), and underscores (ASCII 9595), and its length does not exceed 2020.

For all data, the answer is required to contain only lowercase letters (ASCII 9712297\sim 122), digits (ASCII 485748\sim 57), and hyphens (ASCII 4545).

  • For test point 11: it is guaranteed to be a Main Problem Set problem.
  • For test point 22: it is guaranteed to be an Intro & Interview problem.
  • For test points 343\sim 4: it is guaranteed to be a CodeForces problem.
  • For test points 565\sim 6: it is guaranteed to be a SPOJ problem.
  • For test points 787\sim 8: it is guaranteed to be an AtCoder problem.
  • For test points 9109\sim 10: it is guaranteed to be a UVA problem.

Translated by ChatGPT 5