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
if __name__ == '__main__': | |
n = int(input()) | |
d = {} | |
for i in range(n): | |
k, v = input().split() | |
d[k] = v | |
for i in range(n): | |
k = input() | |
if d.get(k, False): |
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
#!/bin/python3 | |
if __name__ == '__main__': | |
n = int(input()) | |
arr = list(map(int, input().rstrip().split())) | |
print(*arr[::-1]) |
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
n = int(input()) | |
while n >= 0: | |
s = input() | |
o, e = '', '' | |
for i in range(len(s)): | |
if i & 1: | |
o += s[i] | |
else: | |
e += s[i] |
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
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys | |
def namta(n, i): | |
if i < 11: |
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
class Person: | |
def __init__(self,initialAge): | |
if initialAge <= 0: | |
print('Age is not valid, setting age to 0.') | |
initialAge = 0 | |
self.initialAge = initialAge | |
def amIOld(self): | |
if self.initialAge < 13: | |
print("You are young.") |
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
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys | |
if __name__ == '__main__': | |
N = int(input()) |
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
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys | |
# Complete the solve function below. | |
def solve(meal_cost, tip_percent, tax_percent): |
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
# Read a full line of input from stdin and save it to our dynamically typed variable, input_string. | |
input_string = input() | |
# Print a string literal saying "Hello, World." to stdout. | |
print('Hello, World.') | |
print(input_string) | |
# TODO: Write a line of code here that prints the contents of input_string to stdout. |
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
package driver | |
import ( | |
"database/sql" | |
"fmt" | |
_ "github.com/go-sql-driver/mysql" | |
) | |
// DB ... |
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
package handler | |
import ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
"strconv" | |
"github.com/go-chi/chi" | |
"github.com/s1s1ty/go-mysql-crud/driver" |