Skip to content

Instantly share code, notes, and snippets.

View monchy-monchy's full-sized avatar

monchy-monchy

View GitHub Profile
#! python3
# jpx_new.py
import requests, os, bs4
# 対象ページのURLの設定
url = 'http://www.jpx.co.jp/listing/stocks/new/'
# ダウンロードしたPDFファイルを保管するためのフォルダを作成
os.makedirs('jpx_new', exist_ok=True)
#! python3
# PdfToTextConverter.py
# PDFファイルの内容を読み込んで、textファイルとして出力
import os
import re
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
@monchy-monchy
monchy-monchy / CountWords.py
Created August 28, 2017 05:58
テキストファイルで使用されている英単語の数をカウントする。
# モジュールのインポート
import os
import re
# 単語を格納するための空のリスト(単語リスト)を作成
pre_words = []
words = []
# テキストファイルかどうかをチェックする機能の実装。
# 対象となるファイルが .txt ならTrue、それ以外なら Falseを返す。
A = int(input())
B = int(input())
C = int(input())
dic = dict(A=A, B=B, C=C)
dic = sorted(dic.items(), key = lambda x:x[1], reverse=True)
rank = {}
@monchy-monchy
monchy-monchy / ABC019 A - 高橋くんと年齢
Created June 28, 2021 12:56
ABC019 A - 高橋くんと年齢
N = list(map(int, input().split()))
N.sort()
print(N[1])
@monchy-monchy
monchy-monchy / ABC020 A - クイズ
Created June 28, 2021 13:09
ABC020 A - クイズ
Q = int(input())
if Q == 1:
print("ABC")
else:
print("chokudai")
@monchy-monchy
monchy-monchy / ABC021 A - 足し算
Created June 28, 2021 14:38
ABC021 A - 足し算
N = int(input())
answer = []
n = N
while divmod(n, 2) != (0, 1):
answer.append(2)
n = n // 2
else:
answer.append(1)
@monchy-monchy
monchy-monchy / ABC022 A - Best Body
Created June 29, 2021 00:41
ABC022 A - Best Body
N = list(map(int, input().split()))
W = int(input())
A = [int(input()) for _ in range(N[0]-1)]
bb = 0
if N[1] <= W <= N[2]:
bb += 1
for a in A:
@monchy-monchy
monchy-monchy / ABC023 A - 加算王 その1
Created June 29, 2021 00:55
ABC023 A - 加算王 その1
X = int(input())
answer = (X // 10) + (X % 10)
print(answer)
@monchy-monchy
monchy-monchy / ABC023 A - 加算王 その2
Created June 29, 2021 00:57
ABC023 A - 加算王 その2
X = int(input())
answer = divmod(X,10)
print(sum(answer))