Skip to content

Instantly share code, notes, and snippets.

View NoharaMasato's full-sized avatar

NoharaMasato NoharaMasato

View GitHub Profile
#include <iostream>
#include <string>
#include <vector>
using namespace std;
enum Gender{male,female};
string gender_to_string(Gender gen){
switch(gen){
case male:
return "男";
#include <iostream>
using namespace std;
#define MAX_N 100000001
int prime[MAX_N];
bool is_prime[MAX_N + 1];
int sieve(int n) {
int p = 0;
for (int i(0);i<=n;i++) is_prime[i] = true;
@NoharaMasato
NoharaMasato / bug_challenge_#2.rb
Created January 16, 2020 10:30
mixi bug shooting challenge task2
class UsersController < ActionController
def show
user = User.find(params[:id].to_i)
render json: user, except: [:crypted_password]
end
end