Y

@YSS

o

Python
4 weeks ago
def k(a,b): return (b[1]-a[1])/(b[0]-a[0]) print(k([-2,5],[3,-5]))

素数でR

R
1 month ago
for (i in 1:120) { if (i == 1) { next } else if (i %% 2 == 0 && i != 2) { next } else if (i %% 3 == 0 && i != 3) { next } else if (i %% 5 == 0 && i != 5) { next

G

Python
1 month ago
print('Hello world!') def square(A,B,C=2): k=0 p=1 for _ in range(B): if (k**C > A): while (k**C) > A: k -= p elif (k**C < A):

O

Python
1 month ago
print('Hello world!') def name(params): Q=params i=0 for k in range(2): i=0 while i < len(Q)-1: if Q[i] > Q[i+1] Q[i],Q[i+1]=Q[i+1],Q[i] i+=1

O

Python
1 month ago
print('Hello world!') def name(f,x,p): j=0 k=0 for name in range(x): k=(16)**(-name) if f(j) < p: while f(j) < p: j += k

Oo

Python
1 month ago
print('Hello world!') def K(text): jo=0 P="" G={ "A":0,"B":1,"C":2, "D":3,"E":4,"F":5, "G":6,"H":7,"I":8, "J":9,"K":10,"L":11,

O

Python
1 month ago
import matplotlib.pyplot as plt import math from math import comb def Glaf(f,x): d = [n for n in range(x)] t = [f(d[n]) for n in range(x)] plt.plot(d, t) plt.xlabel("x") plt.ylabel("y") plt.title("y = 2x + 1")

G

Python
1 month ago
import random memory = { "A": ["B","C"], "B": ["A","C"], "C": ["B","A"], } print("A" + random.choice(memory["A"]))

P

Python
1 month ago
from collections import defaultdict import random text = """ 私 は 猫 私 は 犬 貴方 は 猫 """ memory = defaultdict(list)

麻雀

NodeJS
1 month ago
class 古代麻雀 { constructor(飜,符) { this.飜 = 飜; this.符 = 符; } } class 中国麻雀 extends 古代麻雀 { constructor(飜,符) { super(飜,符); }

Hol

Python
1 month ago
import math def calc(tokens): t = tokens.pop(0) if t == "+": return calc(tokens) + calc(tokens) elif t == "-": return calc(tokens) - calc(tokens)

P

Python
1 month ago
class name: def __init__(this): this.KIOKU = {} def kiku(this,text): this.q = 0 J = text.split(" ") p=0 for name in J: if name == "=>": this.KIOKU[J[p+1]] = J[p+2]

麻雀

Python
1 month ago
class 古代麻雀: def __init__(self, 飜,符): self.飜=飜 self.符=符 def 子計算(self): pass def 親計算(self): pass class 中国麻雀(古代麻雀): def 子計算(self):

G

Python
1 month ago
import random home = random.randint(0,100) spawn = random.randint(0,100) Q = [[0, 0] for _ in range(100)] # Q[pos][0] = 左 # Q[pos][1] = 右 print(f"ホーム:{home} スポーン:{spawn}") for _ in range(100):

O

Python
1 month ago
import random import math Q = [0]*7 for a0 in range(2): for a1 in range(2): for a2 in range(2): for a3 in range(2): for a4 in range(2): for a5 in range(2): Q[a0+a1+a

T

Python
1 month ago
def ango(params): print(params) p = "" g = 0 for name in list(params): if name != " ": p += chr(int(ord(name)//(2/((g%4)+1)))) else: p+="_"

Hu

C++
1 month ago
#include <iostream> #include <stdio.h> #include <cmath> using namespace std; class china_majan { public: int han; int hu; virtual int ko(){

Hu

C++
1 month ago
#include <iostream> #include <stdio.h> #include <cmath> using namespace std; class china_majan { public: int han; int hu; int ko(){

O

C
1 month ago
#include <stdio.h> int main() { printf("Hello world!\n"); int k[] = {0,50}; while (k[0] < k[1]) { printf("Hello world!\n"); k[0]+=1; k[1]-=1; }

E

Python
1 month ago
print('Hello world!') F=[0]*11 G=0 for A in range(3): for B in range(3): for C in range(3): for AA in range(3): for AB in range(3): G+=1 F[A+B+C+AA+AB]+=1