This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Auto-generated code below aims at helping you parse | |
* the standard input according to the problem statement. | |
**/ | |
var road = parseInt(readline()); // the length of the road before the gap. | |
var gap = parseInt(readline()); // the length of the gap. | |
var platform = parseInt(readline()); // the length of the landing platform. | |
var RoadAndGapLength = road+gap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Auto-generated code below aims at helping you parse | |
* the standard input according to the problem statement. | |
**/ | |
// game loop | |
while (true) { | |
var inputs = readline().split(' '); | |
var spaceX = parseInt(inputs[0]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i = readline().split(' ').map(Number); | |
LX = i[0]; | |
LY = i[1]; | |
TX = i[2]; | |
TY = i[3]; | |
while (1) { | |
s = LX==TX && LY<TY && "N" || ""; | |
s += LX==TX && LY>TY && "S" || ""; | |
s += LY==TY && LX<TX && "W" || ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matrix = [ | |
[1, 2, 3, 4, 5, 6, 7], | |
[7, 6, 5, 4, 3, 2, 1], | |
[6, 5, 4, 3, 2, 1, 7], | |
[4, 3, 2, 1, 7, 6, 5], | |
[2, 1, 7, 6, 5, 4, 3], | |
[5, 6, 7, 1, 2, 3, 4], | |
[3, 2, 1, 7, 6, 5, 4], | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l = int(raw_input()) | |
h = int(raw_input()) | |
t = raw_input() | |
result = [] | |
characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ?" | |
for i in xrange(h): | |
row = raw_input() | |
threshold = len(row)/len(characters) | |
chr_width = threshold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
message = raw_input() | |
binaries = "" | |
for c in message: # converting all inputs to 7 bit | |
bnr = format(ord(c), 'b') | |
if len(bnr) < 7: | |
bnr = "0"*(7-len(bnr)) + bnr | |
binaries += bnr | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import math | |
# Auto-generated code below aims at helping you parse | |
# the standard input according to the problem statement. | |
n = int(raw_input()) # Number of elements which make up the association table. | |
q = int(raw_input()) # Number Q of file names to be analyzed. | |
mime_type_map = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"timezones": [ | |
"America/Aruba" | |
], | |
"latlng": [ | |
12.5, | |
-69.96666666 | |
], | |
"name": "Aruba", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TIMEZONE_COORDINATES = { | |
'Africa/Abidjan': [8, -5], | |
'Africa/Accra': [8, -2], | |
'Africa/Addis_Ababa': [8, 38], | |
'Africa/Algiers': [28, 3], | |
'Africa/Asmara': [15, 39], | |
'Africa/Bamako': [17, -4], | |
'Africa/Bangui': [7, 21], | |
'Africa/Banjul': [13.46666666, -16.56666666], | |
'Africa/Bissau': [12, -15], |