Taxi, 1327/2433 1057/1835 bytes
Two versions here; the shortest one works but shows the result in decimal format (e.g. 20.000000
instead of 20
). I am posting both because, while the longer version is more correct, I still hope to win this code golf with the short one (it could require a little bit of tweaking, though).
Short version
You can test it here.
Go to Post Office: west, 1st left, 1st right, 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: west, 1st left, 1st right.
Pickup a passenger going to Addition Alley.
Go to Starchild Numerology: east, 1st left, 1st left, 1st left, 2nd left.
99 is waiting at Starchild Numerology.
100 is waiting at Starchild Numerology.
Pickup a passenger going to Addition Alley.
Pickup a passenger going to Narrow Path Park.
Go to Addition Alley: east, 1st left, 2nd right, 3rd right, 1st right.
Pickup a passenger going to Divide and Conquer.
Go to Narrow Path Park: north, 1st right, 1st left, 1st right.
Pickup a passenger going to Divide and Conquer.
Go to Divide and Conquer: east, 1st right, 2nd right.
Pickup a passenger going to Trunkers.
Go to Trunkers: east, 1st right, 3rd right, 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: east, 1st right, 1st right.
Pickup a passenger going to Post Office.
Go to Post Office: east, 1st left, 1st right.
Go to Taxi Garage: east, 1st right, 1st left, 1st right.
Long version
You can test it here.:
Go to Post Office: west, 1st left, 1st right, 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: west, 1st left, 1st right.
Pickup a passenger going to Addition Alley.
Go to Starchild Numerology: east, 1st left, 1st left, 1st left, 2nd left.
99 is waiting at Starchild Numerology.
100 is waiting at Starchild Numerology.
Pickup a passenger going to Addition Alley.
Pickup a passenger going to Narrow Path Park.
Go to Addition Alley: east, 1st left, 2nd right, 3rd right, 1st right.
Pickup a passenger going to Divide and Conquer.
Go to Narrow Path Park: north, 1st right, 1st left, 1st right.
Pickup a passenger going to Divide and Conquer.
Go to Divide and Conquer: east, 1st right, 2nd right.
Pickup a passenger going to Trunkers.
Go to Trunkers: east, 1st right, 3rd right, 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: east, 1st right, 1st right.
Pickup a passenger going to Chop Suey.
Go to Chop Suey: east, 6th right, 1st left.
Pickup a passenger going to KonKat's.
[processDigits]
Pickup a passenger going to Cyclone.
Go to Cyclone: north, 1st left, 3rd left.
Pickup a passenger going to Crime Lab.
Go to Writer's Depot: west.
"." is waiting at Writer's Depot.
Pickup a passenger going to Crime Lab.
Go to Crime Lab: east, 1st right, 2nd right, 2nd left.
Switch to plan "notAColon" if no one is waiting.
Switch to plan "print".
[notAColon]
Go to Cyclone: west, 1st right, 1st left, 2nd right.
Pickup a passenger going to KonKat's.
Go to KonKat's: east, 2nd right, 2nd right.
Pickup a passenger going to KonKat's.
Go to Chop Suey: north, 1st right, 1st right.
Switch to plan "processDigits".
[print]
Go to KonKat's: east.
Pickup a passenger going to Post Office.
Go to Post Office: south, 3rd right, 1st left.
Go to Taxi Garage: east, 1st right, 1st left, 1st right.
floor((year - 1)/100) + 1
, and there aren't other clever optimizations that can be done to shorten the overall program; there aren't any "alternative approaches" to the challenge. Since most answers implement the exact same expression, this challenge looks no more interesting than a list of "floor," "decrement," "divide," and "increment" functions in various languages. \$\endgroup\$