All pastes #991473 Raw Edit

Azquelt

public c v1 · immutable
#991473 ·published 2008-04-21 01:21 UTC
rendered paste body
#include  <cstdio>int sumto(int n){	return (n+1)*n/2;}int main(){	int top = 1000000;	printf("%d\n", sumto(top/3)*3+sumto(top/5)*5-sumto(top/15)*15);	return 0;}