Skip to content

Instantly share code, notes, and snippets.

View sota1235's full-sized avatar
🤟
software engineer

Sota Sugiura sota1235

🤟
software engineer
View GitHub Profile
@sota1235
sota1235 / saiko.rb
Created November 15, 2013 08:04 — forked from itochan/saiko.rb
# -*- coding: utf-8 -*-
puts "最高ですか? (y/n)"
puts "最高!!" if gets.chomp == "y"
@sota1235
sota1235 / ls-r.c
Created December 6, 2013 08:32
エセlsコマンド@シスプロ
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<dirent.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<string.h>
/* Created by sota1235
* Date : 2013/12/6
* for SystemProgramming homework */
document.write("hello gist");
#! /usr/bin/ruby
# Date 2014/02/08
# Created by sota1235
require 'open-uri'
# 成功したら配列から削除
$array = [*1..1368]
def save_pic(url)
/* Created by sota1235
* Date:2014/02/14
*/
PImage img, img2;
img = loadImage("path/image");
int w = img.width, h = img.height;
size(w, h);
img2 = createImage(w,h,RGB);
# !/usr/bin/env python
# -*- coding:utf-8 -*-
# Written by sota1235
# Date 2014/3/2
import sys
"""
board上の(x,y)の縦横斜めの値にnを足す
while True:
n = int(raw_input())
if n == 0: break
print sum(map(int, list(str(n))))
while True:
a,b = map(int, sorted(raw_input().split()))
# GCD
for i in range(a, 1, -1):
if a%i == 0 and b%i == 0:
GCD = i
break
# LCM
for i in range(1, a+1):
if (b * i) % a == 0:
#!/usr/bin/python
def sieve(n):
nums = [i+1 for i in range(2, n, 2)]
ans = [2]
while len(nums) != 0:
for i in range(nums[0]*2, nums[-1]+1, nums[0]):
if i in nums: nums.remove(i)
ans.append(nums.pop(0))
return ans
for i in range(1,101): print "FizzBuzz" if (i%3==0 and i%7==0) else ("Fizz" if i%3==0 else ("Buzz" if i%7==0 else i))