Skip to content

Instantly share code, notes, and snippets.

@YuseiUeno
Created Aug 6, 2022
Embed
What would you like to do?
use std::io::{stdout, BufWriter, Write};
use rand::Rng;
const DDSK: i32 = 0b011101110111;
const MASK: i32 = 0b111111111111;
fn main() {
let ddsk = ["ドド", "スコ"];
let mut rng = rand::thread_rng();
let mut buffer = 0;
let mut out = BufWriter::new(stdout().lock());
while buffer != DDSK {
let index = rng.gen_range(0b0..ddsk.len());
write!(out, "{}", ddsk[index]).unwrap();
buffer = (buffer << 1) & MASK | index as i32;
}
writeln!(out, "ラブ注入♡").unwrap();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment