Syncwithme @ 2021-07-20 08:09:00
#include <bits/stdc++.h>
using namespace std ;
int execmd(const char* cmd,char* result) {
char buffer[1000000];
FILE* pipe = _popen(cmd, "r");
if (!pipe)
return 0;
while(!feof(pipe)) {
if(fgets(buffer, 128, pipe)){
strcat(result,buffer);
}
}
_pclose(pipe);
return 1;
}
int main(){
char result[ 1024* 4]= "";
string a, b;
cin >> a >> b;
string ans = "powershell "; //直接调用powershell进行加法
ans += a + "*" + b;
if( 1==execmd(ans.data(),result)){
printf(result);
}
system( "pause");
}
by Froranzen @ 2021-07-20 08:18:47
@添哥 我觉得这个真阴间(
by 添哥 @ 2021-07-20 08:21:57
您不觉得这个更骚吗?
by 飞风追云 @ 2021-07-20 08:24:10
确实是
by Exber @ 2021-07-20 08:24:24
@Kyeic 您的代码提交过吗?system
函数能过编译?
by Leasier @ 2021-07-20 08:24:47
@Kyeic 您这个我早就在校内 OJ 上试过了,但后来被禁了 /kk
by Exber @ 2021-07-20 08:25:15
建议用主席树写 A+B,简单易懂(
by AffineRing @ 2021-07-20 08:33:04
哦
by Zona @ 2021-07-20 08:42:26
哦
by Syncwithme @ 2021-07-20 11:19:57
@lovely_ckj 用windows测评是没问题的,但是洛谷的oj就不行了
by SUITLIE @ 2021-07-20 11:22:41
哦