Skip to content

Instantly share code, notes, and snippets.

@Alexey-N-Chernyshov
Alexey-N-Chernyshov / sieve_of_eratosthenes.py
Created November 15, 2012 14:56
Решето Эратосфена на Python.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import math
n = input("Вывод простых чисел до числа (включительно): ") + 1
# Выписать подряд все целые числа от 2 до n (2, 3, 4, …, n).
a = [True] * n
@Alexey-N-Chernyshov
Alexey-N-Chernyshov / main.c
Last active May 26, 2016 08:50
Get zombie exec status.
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
// SIGCHLD handler
void bury_zombies(int sig_number)
{