Y

@YSS

ッグ

Assembly
6 months ago
section .data msgs: dq A, A_len dq B, B_len dq C, C_len msg_count equ 3 A db "Hello world!", 0ah A_len equ $ - A

素数でRust

Rust
6 months ago
fn main() { for bodopoqo in 1..121 { println!("{}", bodopoqo); if bodopoqo == 1 { println!("→x"); }else if bodopoqo % 2 == 0 && bodopoqo != 2 { println!("→x"); }else if bodopoqo % 3 == 0 &&

O

Rust
6 months ago
fn main() { let mut pp = 0; let mut pq = 0; let mut qp = 0; let mut qq = 0; loop { loop { loop { loop {

T

Python
6 months ago
A = 0 for n in range(1000): A += (4*(((4*n)+1)**(-1)))-(4*(((4*n)+3)**(-1))) print(A)

平方根(ただし不正確)

Python
6 months ago
print('平方根(ただし不正確)') A=0 k=0 x=2 for I in range(10): for i in range(10): k += (0.1) ** I if k**2 == x: break if k**2 > x:

1

Assembly
6 months ago
section .data buf db 0, 0ah section .text global _start _start: mov rcx, 1 ; カウンタ loop:

ソートでRuby

Ruby
6 months ago
f = [1, 1, 4, 5, 1, 4] 10.times do for a in 0..4 if f[a] > f[a+1] g = f[a+1] f[a+1] = f[a] f[a] = g end end

素数でRuby

Ruby
6 months ago
for i in 1..120 do puts i if i == 1 puts"→x" elsif i % 2 == 0 && i != 2 puts"→x" elsif i % 3 == 0 && i != 3 puts"→x" elsif i % 5 == 0 && i != 5 puts"→x"

ソートでC

C
6 months ago
#include <stdio.h> int main() { int a[6] = {1, 1, 4, 5, 1, 4}; int tmp; // バブルソート for (int _ = 0; _ < 10; _++) { for (int i = 0; i < 5; i++) { if (a[i] > a[i+1]) { // 降順

ソートでPython!

Python
6 months ago
T=[1,1,4,5,1,4] for _ in range(10): for A in range(len(T)-1): if T[A] > T[A+1]: J = T[A+1] T[A+1] = T[A] T[A] = J print(T)

PT

Python
6 months ago
def FR(T, P, Y,): G = 0 S = 1 for i in range(P): S = 10 ** (-i) for _ in range(10): if (G + S) ** Y > T: break G += S

pp

Python
6 months ago
하로={} 히사={} 신신=["A","B","C","D","E","F","G","H","I", "J","K","L","M","N","O","P","Q","R", "S","T","U","V","W","X","Y","Z","!",] 란란=["a","b","c","d","e","f","g","h","i", "j","k","l","m","n","o","p","q","r", "s","t","u","v","w","x","y"

F

Assembly
6 months ago
section .data buf db 0, 0 ; 最大2桁 → 2バイト確保 section .text global _start _start: ; ---- 例: rax = 42 ---- mov rax, 2 imul rax, 2

www

Assembly
6 months ago
section .data A db "Hello world!", 0ah B db "このプログラム言 語が難し過ぎて", 0ah C db "しぬ!", 0ah section .text global _start _start: mov rax, 1 mov rdi, 1

ラララララ

Assembly
6 months ago
section .data A db 0 ; 計算結果を1文字で入れる場所 section .text global _start _start: ; --- 計算 --- mov rax, 2 imul rax, 2

素数でC

C
6 months ago
#include <stdio.h> int main() { printf("Hello world!\n"); for (int i = 0; i < 121; i++) { printf("%d\n", i); if (i == 1) { printf("→x\n");

Qq

Python
7 months ago
import dis def f(x): for A in range(len(x)-1): for B in range(len(x)-A): if x[A] > x[A+B]: h=x[A] x[A]=x[A+B] x[A+B]=h return x

P

Python
7 months ago
LIST=[] def INAX(MIN,MAX): for A in range(MAX): LIST.append(f'{MIN+A}') return LIST def AXIN(MIN,MAX):

リスト

Python
7 months ago
import matplotlib.pyplot as plt # カテゴリのリスト(X軸) categories = ['Apples', 'Bananas', 'Oranges', 'Grapes'] # 数量のリスト(Y軸) counts = [23, 45, 15, 30] # 棒グラフの作成 plt.bar(categories, counts)

っt

Python
7 months ago
import matplotlib.pyplot as plt fig, ax = plt.subplots() # 四角形とテキスト ax.text(0.5, 0.8, 'A', ha='center', va='center', bbox=dict(facecolor='lightblue')) ax.text(0.4, 0.8, 'B', ha='center', va='center', bbox=dict(facecolor='lightgreen')) ax.text(0.5,