This file contains hidden or 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
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 |
This file contains hidden or 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
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 |
This file contains hidden or 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
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 |
This file contains hidden or 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 <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"); |
This file contains hidden or 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 <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); |
This file contains hidden or 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 <stdio.h> | |
int main(){ | |
int i, j; | |
printf("\t|"); | |
for(i = 1; i <= 9; i++) | |
printf("%d\t", i); | |
printf("\n"); |
This file contains hidden or 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
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(){ |
This file contains hidden or 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 <stdio.h> | |
int main(){ | |
int i, n; | |
printf("数字を入力\n"); | |
scanf("%d", &n); | |
i = 2; | |
while(i < n && n % i != 0){ | |
i = i + 1; | |
} |
This file contains hidden or 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
[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))) |
This file contains hidden or 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 re, strutils | |
type | |
TokenEx = enum | |
Plus, | |
Minus, | |
Multiply, | |
Divide, | |
Number, | |
LParen, |