Submission #795883

#TimeUsernameProblemLanguageResultExecution timeMemory
795883rainboy그릇 (KOI13_bowl)C11
16 / 16
1 ms300 KiB
#include <stdio.h> #include <string.h> #define N 50 int main() { static char cc[N + 1]; int n, i, ans; scanf("%s", cc), n = strlen(cc); ans = 10; for (i = 1; i < n; i++) ans += cc[i] == cc[i - 1] ? 5 : 10; printf("%d\n", ans); return 0; }

Compilation message (stderr)

aa.c: In function 'main':
aa.c:10:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |  scanf("%s", cc), n = strlen(cc);
      |  ^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...