FORMAT - HTML Formatting
Description
- <b><i>LookAt</b>Me</i>! has incorrectly nested tags.
- <b><i>LookAt</i></b><i>Me</i>! has correctly nested tags, but is longer than necessary.
- <i><b>LookAt</b>Me</i>! is the shortest and uses the fewest number of tags.
Input
- 0 - no formatting
- 1 - bold
- 2 - italic
- 3 - bold and italic
- 4 - underlined
- 5 - bold and underlined
- 6 - italic and underlined
- 7 - bold, italic, and underlined
The example earlier would be given as 333333220.
Output
Input | Input | Input | Input |
---|---|---|---|
01 |
333333220 |
00110066 |
12364012375303657213412303 |
Output | Output | Output | Output |
2 |
4 |
6 |
54 |
hide comments
Satyaki Upadhyay:
2014-07-07 11:21:27
@Avinash The tags need to be properly nested. So the order in which you insert opening or closing braces is important. |
|
Avinash:
2014-01-13 14:57:46
@Satyaki I'm also getting 8. |
|
Satyaki Upadhyay:
2014-01-09 13:58:38
@nitish answer for176751 should be 8 right?
|
|
samfisher:
2013-11-19 22:22:37
@nitish I am getting 16 for your test case , any idea what i am doing wrong |
|
nitish rao:
2013-11-11 16:35:02
Check this one : 176751. Ans:14.
|
|
Andrey Maksimenko:
2013-11-05 11:22:21
Mauro Persano: thank you, but this didn't help. Posted to forum. Will be appreciate for any ideas. |
|
Mauro Persano:
2013-11-04 21:36:02
Andrey Maksimenko: I read the input with scanf, but got WA until I trimmed invalid characters (not 0-7) at the end of the input string. That could be your problem. |
|
Andrey Maksimenko:
2013-11-04 17:17:16
I'm getting answer 54 for "12364012375303657213412303", but still WA, any tricky test cases please? |
|
:D:
2013-10-31 21:20:51
Note it must be properly nested. |
|
aman jain:
2013-10-29 21:02:11
how is the answer for case "12364012375303657213412303" is 54. I think it should be 44. |
Added by: | BYU Admin |
Date: | 2013-10-18 |
Time limit: | 1s-2.5s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |