//https://www.acmicpc.net/problem/1495 #include #include #include using namespace std; bool dp[101][1001]; int V[101]; int main(){ int N, S, M; cin >> N >> S >> M; int x, y; for(int i=1; i> V[i]; dp[0][S]=1; for(int i=1; i
//https://www.acmicpc.net/problem/1476 #include using namespace std; int main(){ int E, S, M; cin >> E >> S >> M; E%=15; S%=28; M%=19; for(int i=1; ;i++) if((i%15)==E && (i%28)==S && (i%19)==M) { cout