QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#525118#7062. Prince and PrincessHuangHanShengCompile Error//C++23457b2024-08-20 13:05:492024-08-20 13:05:49

Details

answer.code: In function ‘int main()’:
answer.code:18:17: error: ‘else’ without a previous ‘if’
   18 |                 else printf("%d", 2*(b+c)+(a!=1));
      |                 ^~~~
answer.code:14:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 |         scanf("%d %d %d", &a, &b, &c);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~