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 -*- | |
puts "最高ですか? (y/n)" | |
puts "最高!!" if gets.chomp == "y" |
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<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 */ |
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
document.write("hello gist"); |
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/ruby | |
# Date 2014/02/08 | |
# Created by sota1235 | |
require 'open-uri' | |
# 成功したら配列から削除 | |
$array = [*1..1368] | |
def save_pic(url) |
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
/* 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); |
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 python | |
# -*- coding:utf-8 -*- | |
# Written by sota1235 | |
# Date 2014/3/2 | |
import sys | |
""" | |
board上の(x,y)の縦横斜めの値に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
while True: | |
n = int(raw_input()) | |
if n == 0: break | |
print sum(map(int, list(str(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
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: |
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/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 |
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
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)) |
OlderNewer