Skip to content

Instantly share code, notes, and snippets.

View 3tomcha's full-sized avatar

Tomoya Hoshino 3tomcha

  • Minato-ku Tokyo
View GitHub Profile
# coding: utf-8
# Your code here!
import math
while True:
n = int(input())
if n == 0:
break
s = list(map(int, input().split()))
# coding: utf-8
# Your code here!
import math
x1, y1, x2, y2 = map(float, input().split())
result = math.sqrt( (x2-x1) * (x2-x1) + (y2-y1) * (y2-y1) )
print(result)
@3tomcha
3tomcha / fpdf.php
Last active November 7, 2018 02:27
FPDFでheaders already sent byとwarningが出てoutput()できない時の解決策 ref: https://qiita.com/3tomcha/items/2e2c079abde67d6ae790
function __construct($orientation='P', $unit='mm', $format='A4')
{
@3tomcha
3tomcha / ITP1_8_D.py
Last active September 28, 2018 11:26
# coding: utf-8
# Your code here!
# ITP1_8_D
N=input()
N=N*2
S=input()
if S in N:
@3tomcha
3tomcha / ITP1_8_C.py
Last active September 27, 2018 12:10
# coding: utf-8
# Your code here!
# ITP1_8_C
import sys
alphabet={chr(i) : 0 for i in range(97, 97+26)}
R=""
for text in sys.stdin:
R += text.lower()
@3tomcha
3tomcha / ITP1_7_B.py
Last active September 19, 2018 03:54
# coding: utf-8
# Your code here!
# ITP1_7_B
# 小中大の順に
# a<b<cとする
import math
@3tomcha
3tomcha / ITP1_7_A.py
Last active September 19, 2018 02:14
# coding: utf-8
# Your code here!
# ITP1_7_A
def judge(point,re_exam_point):
if point>=80:
return "A"
elif 65 <= point < 80:
@3tomcha
3tomcha / ITP1_6_D.py
Last active September 19, 2018 01:46
# coding: utf-8
# Your code here!
# ITP1_6_D
matrix=list()
col=list()
y,x=map(int,input().split())
for _ in range(y):
# coding: utf-8
# Your code here!
print("test4")
# coding: utf-8
# Your code here!
# TP1_2_D
# 5 4 2 2 1
# 22 - 33
# 3 < 5 かつ 3<4だからOK
# 5 4 2 4 1
# 24 - 35