Skip to content

Instantly share code, notes, and snippets.

@Tosainu
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tosainu/5b63773f20e04e3d8aed to your computer and use it in GitHub Desktop.
Save Tosainu/5b63773f20e04e3d8aed to your computer and use it in GitHub Desktop.
例のアレ
#include <iostream>
#include <random>
auto main() -> int {
std::mt19937 rd{std::random_device()()};
std::uniform_int_distribution<const char> stuff('A', 'Z');
unsigned long long int cnt;
std::string cell;
for (cnt = 0; cell != "STAP"; ++cnt) {
// create new cell
cell.assign({stuff(rd), stuff(rd), stuff(rd), stuff(rd)});
std::cout << cell << "細胞 ";
}
std::cout << std::endl;
std::cout << cnt << "回目で陽性かくにん☆" << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment