| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 84772 | sh25_shenpy | 灯的排列问题 | C++ | Accepted | 0 MS | 184 KB | 369 | 2026-02-25 14:11:26 |
#include <cstdio> int N; int M; char p; int n; int s = 0; int main() { scanf("%d", &N); s = N; while(scanf(" %c", &p) != EOF) { if(p == 'Q') break; scanf("%d", &n); s -= n; M++; } s += 2; int mul = 1; for(int i = 1; i <= M; i++) mul *= (s - i); printf("%d", mul); return 0; }