求助spj
  • 板块学术版
  • 楼主ivyjiao
  • 当前回复12
  • 已保存回复12
  • 发布时间2023/1/10 13:07
  • 上次更新2023/10/24 04:54:17
查看原帖
求助spj
578029
ivyjiao楼主2023/1/10 13:07

就是一个多测题,假设你对了 xx 组,给你 100×xT\lfloor 100\times \dfrac x T \rfloor 分。

写挂了,交上去 std WA,求调。

#include "testlib.h"

int main(int argc, char* argv[]) {
    registerTestlibCmd(argc, argv);
    
    int a=0,b=0;

    while(!ans.eof()){
        int pans=ouf.readInt();
        int jans=ans.readInt();

        if (pans==jans) a++;
		b++;
    }
    if(a==b) quitf(_ok, "The answer is correct.");
    quitp(int(100*(a/b)),"Partially Correct get %d percent", 100*int(100*(a/b)));
    return 0;
    
}
2023/1/10 13:07
加载中...