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
program calc(input,output); | |
const DIGIT = 30; | |
type ary = array[0..DIGIT-1] of integer; | |
var a,b,c:ary; op:char; | |
procedure InputNum(var a:ary); | |
var ch:char; | |
i:integer; | |
begin | |
for i := 0 to DIGIT-1 do | |
begin; |
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
#! /usr/env/bin python | |
# -*- coding;utf-8 -*- | |
import sys | |
class Parser(): | |
def __init__(self): | |
self.s = "" | |
self.ptr = 0 | |
self.mem = [ 0 for x in range(0, 100) ] |
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
import math | |
def reinv_ldexp(x, n): | |
b = 2 if n >= 0 else 1 / 2 | |
n *= -1 if n < 0 else 1 | |
a = int(n) | |
while a > 0: | |
if bool(a & 1): | |
x *= b | |
b *= b |
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
#! /usr/bin/env python3 | |
# -*- coding:utf-8 -*- | |
import subprocess | |
#import csv | |
import random | |
import time | |
import matplotlib.pyplot as plot | |
efiles = ["./a.out {0} {1}", "python3 prime.py {0} {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
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
using namespace std; | |
int main(){ | |
int x, y, s, m; | |
while(cin >> x >> y >> s, x){ | |
m = 0; | |
for(int i = 1;i < 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
#include <iostream> | |
#include <utility> | |
#include <algorithm> | |
using namespace std; | |
typedef long long ll; | |
typedef pair<ll, ll> P; | |
bool alldiv(ll t, ll* nums, ll n){ |
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
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int calc(int a, int b, int opr){ | |
switch (opr){ | |
case 1: | |
return a + b; | |
case 2: | |
return a - b; |
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
#include <iostream> | |
#include <algorithm> | |
#include <queue> | |
#include <utility> | |
#include <map> | |
using namespace std; | |
const int Y = 50, X = 50, GUARD = 1; | |
typedef pair<int, int> P; |
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
# -*- coding:utf-8 -*- | |
import re | |
re.match(r"[0−9]", "9000") | |
# <_sre.SRE_Match object; span=(0, 1), match='9'> | |
re.match(r"[0−9]+", "9000") | |
# <_sre.SRE_Match object; span=(0, 4), match='9000'> | |
re.match(r"[0−9]+", "90001909039") |
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
#! /usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
#requirement : lxml | |
import lxml.html | |
import urllib.request as req | |
LAMP_URL = "http://www.beatmania-clearlamp.com/djdata/%s/sp/" |
OlderNewer