Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
84772 sh25_shenpy 灯的排列问题 C++ 通过 0 MS 184 KB 369 2026-02-25 14:11:26

Tests(3/3):


#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; }


测评信息: