GRUP STEAM
Kickass Programmers quprogs
GRUP STEAM
Kickass Programmers quprogs
0
SEDANG BERMAIN
6
ONLINE
Dibentuk
6 November 2015
Bahasa
Bhs. Inggris
Semua Diskusi > General Discussion > Rincian Topik
makka 25 Mar 2016 @ 9:07pm
Code Golf -- Roman Numeral Line Segments
Code Golf Link[codegolf.stackexchange.com]

Write a program or function that accepts an integer in the range 1..3999 as input and returns the number of line segments required to express that integer in standard Roman numerals.

Discuss and leave solutions in the thread.
< >
Menampilkan 1-1 dari 1 komentar
makka 25 Mar 2016 @ 9:08pm 
C, 129 chars

d,x,n[]={1000,900,500,400,100,90,50,40,10,9,5,4,1,4,5,2,3,1,3,2,4,2,3,2,3,1};f(c){while(d+=(c/n[x])*n[x+13],c%=n[x++]);return d;}

C is clearly the best golfing language
Terakhir diedit oleh makka; 25 Mar 2016 @ 9:08pm
< >
Menampilkan 1-1 dari 1 komentar
Per halaman: 1530 50

Semua Diskusi > General Discussion > Rincian Topik