Skip to content

Instantly share code, notes, and snippets.

View agarmu's full-sized avatar

Mukul Agarwal agarmu

View GitHub Profile
@agarmu
agarmu / fizzbuzz.js
Created December 24, 2020 07:44
Fizzbuzz without conditionals 🙃
let fizzbuzz = [
"\rfizzbuzz",
"",
"",
"\rfizz",
"",
"\rbuzz",
"\rfizz",
"",
"",
// must use gcc ¯\_(ツ)_/¯
#include <bits/stdc++.h>
using namespace std;
int closestSquare(int num) {
double root = sqrt((double)num);
double lowerBoundRoot = (int)(root);
double upperBoundRoot = (int)(root + 0.5);
use std::io::{stdin, stdout, Write};
use regex::Regex;
use colored::*;
//[dependencies]
//regex = "1"
//colored = "1.9"
fn main() {
let re = Regex::new(r#"(?x)(?P<num>(-?)([0-9]+)(\.)?([0-9]+)?)(?P<ft>(?P<frm>C|K|F)(?P<to>C|K|F))"#)