Lyndon's Golf Contest 1 P4 - Symbolic Ruby

View as PDF

Submit solution


Points: 0 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type
Allowed languages
Ruby

The evil Ruby overlord has taken you hostage. He agrees to let you go, but only if you are able to solve his puzzle:

Write me a Ruby program that reads a string s from STDIN, and outputs its length to STDOUT. You can only use symbolic characters in your code (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). In addition, your source code must be as short as possible.

Note: You may only submit to this problem in Ruby.

Input Specification

The first line of input contains a single string s (1|s|100). You may assume that s only contains printable characters.

Output Specification

Output on a single line, the length of s.

Scoring

Your score will be computed based on the length of your source code, the shorter the better. For an L-byte program,

  • if L20, you will receive the full 100 points.
  • if 21L23, you will receive 8010×(L21) points.
  • if 24L, you will receive 20.1(80L) points.

Sample Input

Copy
Hello, World!

Sample Output

Copy
13

Comments

There are no comments at the moment.