Submission #159705

#TimeUsernameProblemLanguageResultExecution timeMemory
159705geon040702그릇 (KOI13_bowl)C++14
16 / 16
2 ms384 KiB
#include <bits/stdc++.h> using namespace std; string dish; int main(void) { int i, ans; cin >> dish; ans = 10; for(i=1;i<dish.size();i++) { if(dish[i] == dish[i-1]) { ans += 5; } else { ans += 10; } } printf("%d\n", ans); return 0; }

Compilation message (stderr)

aa.cpp: In function 'int main()':
aa.cpp:12:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(i=1;i<dish.size();i++) {
             ~^~~~~~~~~~~~
#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...