Y

@YSS

S

C
3 months ago
#include <stdio.h> void swap(int *A,int *B) { int swaper = *A; *A = *B; *B = swaper; } int main() { int X = 3; int Y = 2; printf("%d %d\n",X,Y);

Ko

C
3 months ago
#include <stdio.h> int main() { int k = 10; int *l = &k; loop: printf("%d\n",*l); *l+=-1; if (k > 0) {goto loop;} return 0; }

パッケージ

Python
3 months ago
def VM(code): A = 0 J = 0 F = [] k = [] p = 0 P = 0 while A < len(code): if code[A] == "(": F.append([0, 1, 0]) # [size, mode, ptr]

O

C#
3 months ago
using System; using System.Collections.Generic; namespace MyCompiler { class Character { public string Name; public int Age; public string Gender; public Character(string name, int age, bool gender) {

最大約数でFortran

Fortran
3 months ago
program main implicit none integer :: r1,r2,r3,r4 r1 = 1919 r2 = 1919-1 r3 = 1 DO WHILE (MOD(r1, r2) /= 0) r2 = r2-1 END DO print *, r2

ooooooooooooooooooooooooooooooooooooo

Python
3 months ago
import numpy as np import matplotlib.pyplot as plt x = np.linspace(-50, 50, 8000) y = 0 for n in range(1,401): y += (np.sin(2*n*x)/(2*n))

o

NodeJS
3 months ago
const text = "ま"; // UTF-8 → バイト列 const encoder = new TextEncoder(); const bytes = encoder.encode(text); // わざと文字化け(UTF-8 → Shift_JISとして解釈) const broken = new TextDecoder("shift_jis").decode(bytes);

O

C
3 months ago
#include <stdio.h> #include <stdlib.h> int main() { int n = 4; int *list = malloc(64 * sizeof(int)); *(list + 0) = 1; *(list + 1) = 1; int h = 2; int c = 1; while (h < 32) {

O

Python
3 months ago
def sort(LI): G = LI ps = 0 while ps < len(LI)-1: if G[ps] > G[ps+1]: G[ps],G[ps+1] = G[ps+1],G[ps] ps = 0 ps+=1

O

Python
3 months ago
S = lambda a,b:((a**2-4*b)**0.5 - a)/2 x=S(-5,2) print(x**2+-(5*x)+2)

Dom

Python
3 months ago
def VM(code): A = 0 J = 0 loop = [] P = {} La = [] Jam = 0 Julia = code.split(" ") while A < len(Julia): if Julia[A] == "DEF":

Python
3 months ago
class Text: def __init__(self, t): self.__t = t def get(self): return self.__t class Message: def __init__(self, text): self.text = text

O

R
3 months ago
x <- seq(-10*pi, 10*pi, 0.01) plot(x, (sin(x)+(sin(2*x)/2)+(sin(3*x)/3))+ +(cos(x)+(cos(2*x)/2)+(cos(3*x)/3)))

O

Python
3 months ago
import random as R text="""ABCDEFGHIJKLMNOPQRSTUVWXYZ -,.!?""" T="" for name in [0]*100: for name in [0]*100: T += text[R.randint(0,len(text)-1)] T += chr(10) print(T)

O

Python
3 months ago
import random # --- 設定 --- boxes = [random.randint(0,1) for n in range(5)] ai_brain = [5]*5 print("学習前:", ai_brain) for _ in range(100000): choice = random.choices([n for n in range(5)], weights=ai_brain)[0] if boxes[choice] == 1:

O

Python
3 months ago
A = [1,1,4,5,1,4] P = [0,0,0] while P[0] < len(A): P[1] = P[0] while P[1] < len(A): if A[P[0]] > A[P[1]]: A[P[0]],A[P[1]] = A[P[1]],A[P[0]] P[2] += 1 P[1] += 1 P[0] += 1

O

Python
3 months ago
class NOTOK: def __init__(this): this.__notok = {} def set(this,A,B): if (B in this.__notok) != True: this.__notok[A] = B def mov(this,A,B): this.__notok[A] = this.__notok.pop(B) def go(this,A,B):

O

C
3 months ago
#include <stdio.h> #include <stdlib.h> int main() { int k = 32; int *A = malloc(k * sizeof(int)); *(A + 0) = 1; *(A + 1) = 1; int n = 2; while (n < k) { *(A + n) = *(A + n-1) + *(A + n-2);

O

Python
3 months ago
def difference(f,x): return f(x)-f(x-1) s=lambda x: x**3 print(difference(s ,2))

H

Python
3 months ago
def name(A,B): O = 0 P = 0 for k in range(A): O = 0.5 ** k if P**2 < B: P += O else: P -= O return P