Questions tagged [conversion]

This tag indicates that the challenge involves converting from one format to another.

Filter by
Sorted by
Tagged with
14 votes
31 answers
2k views

Convert superscript numbers to normal numbers

Introduction My gnome friends are writing a programming language and have asked for my help. Due to their size, the gnomes can only handle small superscript numbers instead of big numbers. However, ...
user avatar
  • 3,204
8 votes
5 answers
349 views

Average impact of multiple conversion errors

Imagine four people stand in a line. The first looks at a thermometer, and tells the temperature to the person on their right. This continues down the line, until the last person writes the ...
user avatar
1 vote
1 answer
150 views

Twist on words to numbers [closed]

The Goal The goal of this question is to put a twist on this question. Your answer should be able to convert an array of words associated with integers into those integers. As an extra challenge, ...
user avatar
23 votes
15 answers
2k views

Convert height to US Men’s Jacket size

In the US, clothing size sometimes has rough designations like M, L, XXL, etc. The US designation of the "men's jacket" category depends on the height of the person. So, in this challenge, ...
user avatar
  • 12k
22 votes
44 answers
3k views

Converting Strings to Decimals (Gone Wrong)

What? Many programming languages, both practical and esoteric, have functions, methods, etc to convert a given string to a decimal number. This is how the process might work: For each character in ...
user avatar
  • 2,599
24 votes
9 answers
2k views

Bilibili AV/BV Code Conversion

Background Bilibili is a China-based video sharing platform, similar to Nico Nico Douga in Japan, and Youtube around the world. Since the establishment, Bilibili had been using the AV code to ...
user avatar
4 votes
15 answers
666 views

Convert a decimal integer to binary only using arithmetic operators

There are 10 types of people in the world, those who understand binary and those who do not. Where are you? Let's see! Challenge Your task is to convert a decimal integer to binary, only using a ...
user avatar
  • 11.9k
9 votes
1 answer
551 views

Convert Complex Chinese Numbers into Arabic Numbers

Your task is to convert Chinese numerals into Arabic numerals. A problem similar to Convert Chinese numbers, however, more complex. Also, answers given there mostly don't satisfy all the conditions. ...
user avatar
  • 93
26 votes
36 answers
4k views

Convert a string of digits from words to an integer

Convert a string containing digits as words into an integer, ignoring leading zeros. Examples "four two" -> 42. ...
user avatar
  • 381
17 votes
18 answers
4k views

Decode a variable-length quantity

A variable-length quantity (also referred to as VLQ or uintvar) is a way to encode up to a 28 bit integer value using only as many bytes as necessary. This was used ...
user avatar
  • 11.1k
10 votes
17 answers
1k views

Tesco's Burger Relish Best Before End date number

Given a date between 2010-01-01 and 2099-12-31 as three integers (please state your order if not [year,month,day]), answer with Tesco's corresponding five-digit ...
user avatar
  • 27.1k
-2 votes
1 answer
268 views

Morse sudo-ku-de

Hehe, see what I did with the title? Anyways... Your job is to create a sudoku solver that accepts input in Morse code and creates output in Morse code. Here's the Morse code numbers for reference: <...
user avatar
  • 2,464
1 vote
0 answers
98 views

Sino-Korean numerals [duplicate]

The Korean language has two sets of numerals, a native Korean numerals and Sino-Korean numerals. The native Korean numerals are mostly used for numbers under 100, such as age and time. The Sino-...
user avatar
  • 461
16 votes
10 answers
2k views

Convert an Excel date code to a "date"

Given a non-negative integer Excel-style date code, return the corresponding "date" in any reasonable form that clearly shows year, month, and "day". Trivial, you may think. Did you notice the "scare ...
user avatar
  • 27.1k
14 votes
2 answers
719 views

Densely packed decimal (DPD) to decimal, with logic gates

Inspired by recent popularity of nandgame on TNB, and my own previous challenge. Background Densely packed decimal (DPD) is a way to efficiently store decimal digits in binary. It stores three ...
user avatar
  • 62.1k
28 votes
12 answers
3k views

Densely packed decimal (DPD) to decimal

For nandgame fans: Please try out DPD to decimal in logic gates too! Background Densely packed decimal (DPD) is a way to efficiently store decimal digits in binary. It stores three decimal digits (...
user avatar
  • 62.1k
26 votes
20 answers
2k views

Crown hundred crownty crown

I noticed a certain game had a peculiar life counter, which instead of stopping at 999, gained a new digit – the next number was crown hundred or ...
user avatar
  • 4,917
41 votes
27 answers
7k views

Count Like a Babylonian

Challenge Given an ASCII representation of a Babylonian number as input, output the number in Western Arabic numerals. Babylonian Numeral System How did the Babylonians count? Interestingly, they ...
user avatar
  • 22.7k
37 votes
6 answers
2k views

COBOL Y2K redux

In the 1990s, COBOL computer engineers worked out a way to extend six-digit date fields by converting them to YYYDDD where YYY ...
user avatar
25 votes
12 answers
3k views

Bake me some moji

Given a string, character list, byte stream, sequence… which is both valid UTF-8 and valid Windows-1252 (most languages will probably want to take a normal UTF-8 string), convert it from (that is, ...
user avatar
  • 27.1k
2 votes
1 answer
120 views

Array-of-array string conversion to and from matrix [closed]

Matrix challenges are popular. There's an issue of how to provide test cases. A common method is the row-wise array-of-arrays representation, such as: ...
user avatar
  • 4,274
3 votes
5 answers
389 views

Help me with my chemistry homework!

Near the middle of the semester in chemistry, we get problems like: Convert 1.283850057 to Scientific Notation and Convert 3.583✕106 to Standard Notation This is just stupid busy work for ...
user avatar
  • 1,514
18 votes
10 answers
5k views

HSL to RGB values

The main purpose of the RGB (Red Green Blue) color model is for the sensing, representation and display of images in electronic systems, such as televisions and computers HSL (Hue Saturation Lightness)...
user avatar
  • 346
12 votes
7 answers
9k views

Convert between Music clefs

Before you leave, you do not have to understand much musical notation to do this challenge. EXPLANATION In standard sheet music, double clefs go across the page serving as reference points to the ...
user avatar
  • 1,514
10 votes
14 answers
561 views

Expand Comparison Chains

Unlike most languages, Python evaluates a<b<c as it would be done in mathematics, actually comparing the three numbers, as opposed to comparing the boolean <...
user avatar
  • 25.5k
11 votes
7 answers
1k views

Simple DTMF decoding: find the phone key!

This is a simple challenge which hopefully may lead to some creative answers. Quoting Wikipedia: "Dual-tone multi-frequency signaling (DTMF) is an in-band telecommunication signaling system using the ...
user avatar
  • 166k
9 votes
16 answers
2k views

Convert CMYK values to RGB

Given Color codes in CMYK, convert it to RGB value. Input: string of 4 integers(ranging from 0-100) separated by space 86 86 0 43 28 14 0 6 0 41 73 4 Output: ...
user avatar
  • 1,710
13 votes
21 answers
2k views

How to convert HEX2 to RGBA?

The world of art is full of colour, but the world of the network is even fuller than the world of art of diferent colours and it's renderings. That's why we need to know how to convert one type of ...
user avatar
  • 165
35 votes
15 answers
5k views

How much Mana do I need?

Dungeon Master was one of the first ever real-time role-playing games, originally released in 1987 on the Atari ST. Among other exciting things for the time, it offered a rather sophisticated spell ...
user avatar
  • 166k
14 votes
14 answers
1k views

Short Date into English Long Date

Convert short date format into English long date in as few bytes as possible. Input Input will be in the form of a string with format, yyyy-mm-dd, with zero padding ...
user avatar
  • 1,239
6 votes
2 answers
445 views

Generate chord charts for ukulele

Your task is to write a function which outputs a ukulele chord chart in the following format for a given chord symbol. For instance, for input "G7", it must output: ...
user avatar
5 votes
16 answers
573 views

Convert Binary to Text [duplicate]

Your task is to write a program, which takes a binary input and converts it to plain text. For Example: 01100001 01100010 01100011 = "abc" Rules Input can come ...
user avatar
  • 313
0 votes
6 answers
380 views

TiB, not TB, Seriously?

If you're like me (and/or use Windows), You should have found this issue quite disturbing. You plug in a hard drive (2TB for my occasion), and realize it doesn't show as 2TB, but a bit smaller size ...
user avatar
  • 5,271
9 votes
8 answers
356 views

Convert AWG to Inches

AWG (American Wire Gauge) is a common way of specifying wire sizes. Your task in this challenge is to convert from a given gauge to the diameter of the wire in inches. The size in inches for the ...
user avatar
  • 25.5k
22 votes
17 answers
2k views

Neutralize data

To neutralize data, recursively replace all numbers (not digits!) with zeros and all characters (not strings!) with spaces. You must accept any single number, character, or string, or possibly ...
user avatar
  • 27.1k
28 votes
40 answers
6k views

12 hour to 24 hour time converter

Amazingly, this simple task doesn't seem to exist already, so... Your task is to write a program that takes as input a 12 hour time, and converts it into "military time", or 24-hour time format. ...
user avatar
8 votes
3 answers
359 views

Line ending conversion program

Write a program or function that alters the file at a user-specified filename via replacing all instances of UNIX line endings with Windows line endings and vice versa. Clarifications: For the ...
user avatar
7 votes
3 answers
437 views

World Time Conversion

World Time Conversion Challenge: Given an initial clock time in UTC and a list of countries: for each country in the list, output the local time it is in that country based on the initial time. In ...
user avatar
  • 2,348
20 votes
6 answers
1k views

Make An ASCII Poker Chip Stack Arrangement

Poker has etiquette in how you arrange your chips, often enforced in tournaments - your chips may not be "hidden" from your opponents by being behind others, mostly to not hide some large denomination ...
user avatar
7 votes
15 answers
1k views

Convert to Bubble Letters

So I was playing around with my compose key, and found some cool things, one of them being that by pressing compose + ( + alphanumeric + ), you get that character ...
user avatar
  • 25.5k
28 votes
24 answers
2k views

Convert to Bibi-binary

Bibi-binary is a numeric system invented by Boby Lapointe in order to represent numbers in letters which pronunciation seems funny. Your task is to convert decimal numbers into Bibi-binary! ...
user avatar
  • 3,722
-1 votes
8 answers
386 views

Convert string to number [duplicate]

Task The task is to convert a string to a number. It must accept the string via stdin and output the number via stdout. You convert a string to a number by replacing each letter of the string by its ...
user avatar
  • 16.1k
18 votes
19 answers
2k views

Text animation format Code Golf [duplicate]

Working with old files from DOS, I found an ancient text animation format, that specify how much time each frame must be shown in the screen. It's very simple: F1W5F2W3 This example above indicates ...
user avatar
  • 401
19 votes
4 answers
396 views

Convert an Expression to Panfix Notation

I was browsing esolangs, and chanced upon this language: https://github.com/catseye/Quylthulg. One interesting thing about this language, is that it doesn't use prefix, postfix, or infix, it uses all ...
user avatar
  • 25.5k
9 votes
13 answers
2k views

From Rgb to Cmyk

Given 3 bytes or RGB as input, calculate the nearest CMYK values, and output them. create either a function with parameters and return value or a program that operates on stdin/stdout use the color ...
user avatar
  • 14.4k
15 votes
1 answer
802 views

Convert ASCII box drawing into Unicode

I am shamelessly posting a request for something I would actually find useful. The task is to take an arbitrary ascii box drawing like this ...
user avatar
7 votes
1 answer
194 views

Judge Some Titrations

In chemistry class, we were learning about titrations, and attempting one as a lab. We were using phenolphthalein as the indicator for the titration, so on top of grading the lab normally, my teacher ...
user avatar
  • 25.5k
31 votes
27 answers
3k views

Golf Text into DNA

Text to DNA golf Challenge Convert input into a DNA output. Algorithm Convert text into ASCII code points (e.g. codegolf -> ...
user avatar
  • 2,104
8 votes
8 answers
653 views

Reverse Greek Conversion Golf

Introduction You must create a function to convert Greek numerals into Arabic numerals. The input will be a Greek numeral less than 1000 and more than ...
user avatar
  • 2,104
-3 votes
29 answers
954 views

Convert phrases to reverse style [duplicate]

The Challenge Convert a phrase of two words to reverse style: candy bar -> bar le candy. Specifications There will be one word (only ...
user avatar
  • 2,104