https://www.patest.cn/contests/pat-b-practise/1040 #include "stdio.h" int main() { int p = 0, a = 0, t = 0; char c; while(scanf("%c", &c) && ('\n' != c)) { if('P' == c) ++p; else if('A' == c) a += p; else if('T' == c) t = (…
原题连接:https://pta.patest.cn/pta/test/16/exam/4/question/677 题目如下: The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist for PAT. Input Specification: Each…