Skip to content

Instantly share code, notes, and snippets.

View Daniiarz's full-sized avatar
💘
Python

Daniiarz

💘
Python
View GitHub Profile
@Daniiarz
Daniiarz / problem1.py
Last active September 18, 2019 06:36
import sys
word_list = [i[:-1] for i in sys.stdin.readlines() ]
for i in range(len(word_list)):
print("{}{}".format(" " * i if i != 0 else "", word_list[i]))
age_list = list(map(int, input().split(" ")))
def oldest(anton, boris, victor):
if anton == boris == victor:
return "Same age"
elif anton == max(age_list):
return (anton == boris and "Victor") or (anton == victor and "Boris") or "Anton"
from ctypes import *
aa = int(input())
def find_temp(a):
return int((a * 1.8) + 32)
bb = c_int().value = find_temp(aa)
public class Author {
private String name;
private String email;
private char gender;
public Author(String name, String email, char gender) {
this.name = name;
this.email = email;
this.gender = gender;
class Role(models.Model):
"""
Role model. Used as a model to group user to specific group depending on their type of work
"""
name = models.CharField(max_length=50)
def __str__(self):
return self.name
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from . import views
# router = DefaultRouter()
# router.register(r"roles", views.RoleViewSet)
urlpatterns = [
path("roles/", views.RoleViews.as_view(), name="roles")
]
import java.util.Scanner;
public class GroupC1 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
for (int i = 1; i <= n; i++) {
public class ISBNreader {
public boolean isValid(String string) {
String n2 = string.replaceAll("-", "");
int result = 0;
if (n2.length() != 10) {
return false;
}
import java.util.Arrays;
class Matrix {
private int[][] a;
Matrix(String matrixAsString) {
String[] rows = matrixAsString.split("\\n+");
int ncols = rows[0].split("\\s+").length;
a = new int[rows.length][ncols];
for (int i = 0; i < rows.length; i++) {
serializer = QuestionSerializer(events)
serializer.is_valid()
return Response(serializer.data)