#include <windows.h>
#include <stdio.h>
#include <string>
#include <sstream>
#include <vector>
#include <math.h>

int wmain(int argc, WCHAR *argv[])
{
	const double a = 0.0004;
	const double b = 0.04;
	const double d = 300;
	const double peoples = 100;
	const double breaths = 840 * 24 * 31;
	char temp[32] = {0};
	std::string log("ppm");
	for (double people = 1; people < peoples;) {
		sprintf(temp, ",%.0lf", people);
		log += temp;
		people += people < 10? 1 : people < 50? 5 : people < 100? 10 : 50;
	}
	printf("%s\n", log.c_str());
	log.clear();
	for (double volume = 1; volume < 10000;) {
		const double e = volume / 840;
		sprintf(temp, "%.0lf", volume);
		log += temp;
		for (double people = 1; people < peoples;) {
			const double c = 0.0005 * people;
			double n = 0.0004;
			for (unsigned int breath = 0; breath < breaths; breath++) {
				double f = d * n;
				double g = n * c;
				double h = c * b;
				double i = f - g + h;
				double j = i / d;
				double k = j * e;
				double l = a * e;
				double m = i - k + l;
				n = m / d;
			}
			sprintf(temp, ",%04.0lf", n * 1000000);
			log += temp;
			people += people < 10? 1 : people < 50? 5 : people < 100? 10 : 50;
		}
		printf("%s\n", log.c_str());
		log.clear();
		volume += volume < 5? 1 : volume < 50? 5 : volume < 100? 10 : volume < 500? 50 : volume < 1000? 100 : 1000;
	}
	return 0;
}
