Skip to content

Instantly share code, notes, and snippets.

View Cin316's full-sized avatar

Nicholas Reichert Cin316

View GitHub Profile
@Cin316
Cin316 / codeGolf.swift
Created February 24, 2018 22:58
TechOlympics 2018 Code Golf
let t=Int(readLine()!)!
let a=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","forteen","fifteen","sixteen","seventeen","eighteen","nineteen"]
let b=["twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"]
if (t<20){print(a[t])} else if(t<100){print(b[t/10-2]+" "+a[t%10])} else if(t<1000){
let p=(t%100)/10
if (p<2){print(a[t/100]+" hundred "+a[t%20])} else {print(a[t/100]+" hundred "+b[p-2]+" "+a[t%10])}}
Befunge:
&&+.@
# file: rfcomm-client.py
# auth: Albert Huang <albert@csail.mit.edu>
# desc: simple demonstration of a client application that uses RFCOMM sockets
# intended for use with rfcomm-server
#
# $Id: rfcomm-client.py 424 2006-08-24 03:35:54Z albert $
from bluetooth import *
import sys
import random