Skip to content

Instantly share code, notes, and snippets.

View kimitoboku's full-sized avatar

Kento KAWAKAMi kimitoboku

View GitHub Profile
#include<stdio.h>
void bubblesort(int array[],int n){
int i;
for(i=n-1;i!=0;i--){
int index;
for(index = 0; index < i ;index++){
if(array[index] > array[index+1]){
int n = array[index];
array[index] = array[index+1];
@kimitoboku
kimitoboku / main.c
Created June 5, 2014 08:34
music data list print shell
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<ctype.h>
#include<sys/types.h>
#include<sys/stat.h>
typedef struct {
char name[200];
char artist[200];
@kimitoboku
kimitoboku / main.c
Last active August 29, 2015 14:03
maze
#include<stdio.h>
#include<stdlib.h>
void disp(int ary[],int w,int h){
int i,j;
for(i=1;i<w-1;i++){
for(j=1;j<h-1;j++){
switch(ary[i*w + j]){
case 0:printf("#");break;
case 1:printf(".");break;
import matplotlib.pyplot as plt
import random
a1 = 1.0
a2 = 4.0
xs = []
a = []
for i in range(100000):
an = a1 + (a2 - a1) * float(i) / 100000
@kimitoboku
kimitoboku / main.c
Last active August 29, 2015 14:03
poly sum
#include<stdio.h>
#include<stdlib.h>
struct mono{
int correc;
int power;
struct mono *next;
};
$ perl -e 'print scalar reverse"==AVoVGImxWYnBSazByUzMkUzQ1XLNTW"' | base64 -D | perl -e 'while(<>){print scalar reverse $_}'
cat onion.txt| base64 -D | base64 -D | base64 -D | base64 -D | base64 -D |base64 -D | base64 -D | base64 -D | base64 -D | base64 -D | base64 -D | base64 -D | base64 -D |base64 -D | base64 -D |base64 -D | uudecode
require 'uri'
require 'net/http'
def http_request(method, uri, query_hash={})
query = query_hash.map{|k, v| "#{k}=#{v}"}.join('&')
query_escaped = URI.escape(query)
uri_parsed = URI.parse(uri)
http = Net::HTTP.new(uri_parsed.host,10080)
return http.post(uri_parsed.path, query_escaped).body
end
Maximum = 274804002340875032441111945052338695066094639885538684207460638041831698138955791698008614030188794770670069893083077967804847453153803913408967500061296200418900142271531614777955446068446204189307344556282931652007165895647159270759724719458999987023557759985864121720952524398668099944856546881643463344130813178818329115380925361069508175229673203329864722281434091346673846589279120639393608946606868480928665119788421018752526935591376318255983360064942316712662252720319794061896534167471099387193016865598401961156702468197444641386411165189311347579504275345204222193866744578970674150816094959832295040376035530574075749512285081995821974547800947632153199768886456788132857157024027864915005786361480030403445284238027416149181792694921376274094182902765731101623622484015768953283827445869903898943052715247454036708674657968898707604225280491045987363644477821843453024764776063777088165859601674561067270763858366520185803597748574877548144841739436380116366463252769510659993065713240566676673053099
@kimitoboku
kimitoboku / maxmin.rb
Created December 7, 2014 10:43
seccon prog100
require 'socket'
host = "number.quals.seccon.jp"
port = 31337
sock = TCPSocket.new(host,port)
num = []
while n = sock.gets