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 | |
import random | |
i = 0 | |
maks = ['ズン','ドコ'] | |
while i != 5: | |
if random.choice(maks) == 'ズン': | |
i = i + 1 |
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 | |
#python2.7 | |
import random | |
import sys,select | |
situmonsuu = 0 | |
saigo = 0 | |
def game(situmonsuu,setei,enzan): | |
maru = 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
y = 0 | |
for x in xrange(0,1000): | |
if x % 3 == 0: | |
y = y + x | |
elif x % 5 == 0: | |
y = y + x | |
else: | |
pass | |
print 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
y = 0 | |
def fibonacci(n, a=1, b=0): | |
return b if n < 1 else fibonacci(n - 1, a + b, a) | |
for x in xrange(1,35): | |
f = fibonacci(x, a=1, b=0) | |
if f % 2 == 0: | |
y = y + f | |
print 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
fibs = [1,2] | |
index = 0 | |
while True: | |
nextIndex = index + 1 | |
fib = fibs[index] | |
nextFib = fibs[nextIndex] | |
newFib = fib + nextFib | |
if newFib > 4000000: | |
break | |
fibs = fibs + [newFib] |
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 -*- | |
from googleapiclient.discovery import build | |
from googleapiclient.errors import HttpError | |
print('youtubeの動画を検索することができます!') | |
print('キーワードを入れてね!') | |
qe = input("->") | |
class SearchYoutube(object): |
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
from math import ceil, floor | |
from web import WebView | |
import appex | |
import ui | |
import clipboard | |
import os | |
max_frame = (0, 0, 359, 650) | |
COLS = 3 | |
ROWS = 2 |
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
from discord import Embed | |
GO_REACTION = "\N{BLACK RIGHT-POINTING TRIANGLE}" | |
BACK_REACTION = "\N{BLACK LEFT-POINTING TRIANGLE}" | |
STOP_REACTION = "\N{BLACK SQUARE FOR STOP}" | |
class ListView: | |
page = 0 | |
embed = None | |
message = None |
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
dispander: https://github.com/DiscordBotPortalJP/dispander.git |
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
(* 文字列をcharのlistにする *) | |
let explode s = List.init (String.length s) (String.get s) | |
let dp = Array.make_matrix 100 2 0 | |
let _ = dp.(0).(1) <- 1 | |
let s = read_line () | |
let zero = int_of_char '0' | |
let s_array = explode s |> List.map int_of_char |> Array.of_list | |
let rec zero_to_zero_loop i j k = | |
if j >= k then () else | |
(dp.(i+1).(0) <- dp.(i+1).(0) + dp.(i).(0); zero_to_zero_loop i (j+1) k) |
OlderNewer