2021-03-01から1ヶ月間の記事一覧
集合の部分集合を全て列挙するプログラム import sequtils let n = 4 for bit in 0..<(1 shl n): var vec = newSeq[int]() for i in 0..
atcoder.jp from math import cos, sin, atan2 n = int(input()) x0, y0 = map(int, input().split()) x2, y2 = map(int, input().split()) xh = (x0+x2)/2 yh = (y0+y2)/2 r = ((x0-x2)**2+(y0-y2)**2)**0.5 r/=2 A = atan2((y0-yh), (x0-xh)) x = r*cos(A+…
atcoder.jp let s = stdin.readLine echo s[1..2] & s[0] atcoder.jp import sequtils, strutils, strformat, algorithm, math, sugar var h, w, x, y, ans: int (h, w, x, y) = stdin.readLine.split.map(parseInt) let s = (0..
リポジトリのNEWボタンを押す。 リポジトリの名前を登録する リポジトリを作ったらgit cloneしてきて編集を行いコミットする。 $ mkdir folda $ cd folda $ touch README.md $ echo "#test" >> README.md $ touch sample.py$ git init $ git add . $ git com…
基本情報技術者試験を受けてきました。就職活動でIT系の企業を受ける際に役立ちそうなので受けてみました。なお、私自身は機械工学を大学で学んでおり、情報系の知識が皆無の状態で勉強を始めました。ただし、C言語は大学で履修していました。試験の結果結果…
import Crypto.PublicKey.RSA as RSA # 与えられたもの N = 97139961312384239075080721131188244842051515305572003521287545456189235939577 E = 65537 C = 77361455127455996572404451221401510145575776233122006907198858022042920987316 # ./mesieve …
素因数分解パッケージmsieveのインストール方法を紹介します。 以下のコマンドを実行します。 $ sudo apt-get install build-essential libgmp3-dev zlib1g-dev libecm-dev次に以下のコマンドを実行します。少し時間がかかります。 $ wget "http://downloads…