Skip to content

Instantly share code, notes, and snippets.

@s16003
Created February 20, 2017 07:39
Show Gist options
  • Save s16003/eae2ea2c69b947cc53ec6ac13f884461 to your computer and use it in GitHub Desktop.
Save s16003/eae2ea2c69b947cc53ec6ac13f884461 to your computer and use it in GitHub Desktop.
もし次の常駐先が女子エンジニアばっかりだったら
a, d, p = input().split()
a = int(a)
d = int(d)
if p == "+":
print(a + d)
else:
print(a - d)
[a,b,c] = [int(input()) for _ in range(3)]
print(a + b + c)
S = input()
n = S.find('help');
if n >= 0:
print('SOS')
else:
print(S)
N = int(input())
i = [int(x) for x in input().split()]
i2 = [int(x) for x in input().split()]
for x in range(N):
for x2 in range(N):
a = str(i[x2] + i2[x]) + " "
if x2 == N - 1:
print(a.rstrip(), end="")
else:
print(a, end="")
print("")
N = int(input())
p = [[]]
for x in range(N):
p.append([int(x) for x in input().split()])
M = int(input())
for x in range(M):
c = [int(x) for x in input().split()]
print(p[c[0]][0] * c[1] - p[c[0]][2] * (c[1] // p[c[0]][1]))
a = [int(i) for i in input().split()]
A = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
s = input()
t = input()
T = [int(x) for x in list(str(t))]
if s == "encode":
n = ""
for i in range(len(T)):
x = T[i]
n += str(a[x])
print(n)
elif s == "decode":
n = ""
for i in range(len(T)):
for x in range(len(a)):
if a[x] == T[i]:
n += str(A[x])
print(n)
else:
print("error")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment