Skip to content

Instantly share code, notes, and snippets.

View stmtk1's full-sized avatar

Motoki saito stmtk1

View GitHub Profile
@stmtk1
stmtk1 / nand.hs
Last active October 19, 2018 12:15
module Main where
nand :: Bool -> Bool -> Bool
nand True True = False
nand _ _ = True
not :: Bool -> Bool
not x = Main.nand x x
and :: Bool -> Bool -> Bool
module Main where
nand :: Bool -> Bool -> Bool
nand True True = False
nand _ _ = True
not :: Bool -> Bool
not x = Main.nand x x
and :: Bool -> Bool -> Bool
BYTE = 256
class NewInt:
def __init__(self, value):
while value < 0:
value += BYTE
self.value = value % BYTE
def incl(self):
self.value = (self.value + 1) % BYTE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#define AMOUNT_OF_STUFF 40
//Learned my lesson! No more easy flags
/*void win(){
system("/bin/cat ./flag.txt");
#include <stdio.h>
#include <math.h>
#define PI 3.1415926535
#define N 100
double f(double x);
double integral(double (*func)(double), int n, double start, double end);
double simpson(double (*func)(double), int n, double start, double end);
@stmtk1
stmtk1 / a.c
Last active June 8, 2018 05:10
#include <stdio.h>
int main(){
int i, j;
printf("\t|");
for(i = 1; i <= 9; i++)
printf("%d\t", i);
printf("\n");
class Bullet {
public double x, y, vx, vy;
double r = 10;
public color filled;
public Bullet(){
filled = color(255, 255, 255);
}
public void move_and_draw(){
#include <stdio.h>
int main(){
int i, n;
printf("数字を入力\n");
scanf("%d", &n);
i = 2;
while(i < n && n % i != 0){
i = i + 1;
}
[print("FizzBuzz" if i % 15 == 0 else ("Buzz" if i % 5 == 0 else ("Fizz" if i % 3 == 0 else i))) for i in range(100)]
list(map((lambda i : print("FizzBuzz" if i % 15 == 0 else ("Buzz" if i % 5 == 0 else ("Fizz" if i % 3 == 0 else i)))), range(100)))
import re, strutils
type
TokenEx = enum
Plus,
Minus,
Multiply,
Divide,
Number,
LParen,