#include <stdio.h> int main(void) { int a[20190324]; a[0] = 1; a[1] = 1; a[2] = 1; for (int i = 3; i < 20190324; i++) { a[i] = (a[i - 1] + a[i - 2] + a[i - 3]) % 10000; } printf("%d", a[20190323]); return 0; }