제출 #717680

#제출 시각아이디문제언어결과실행 시간메모리
717680VMaksimoski008Memory (IOI10_memory)C++14
컴파일 에러
0 ms0 KiB
#include "grader.h"
#include "memory.h"
#include <map>

void play() {
    
    int candies = 0;
    
    std::map<char, int> mapa;
    
    for(int i=1; i<=50; i++)
    {
        char ch = faceup(i);
        mapa[ch]++;
        if(mapa[ch] == 2) 
            candies++:
                
        if(candies == 25)
            return ;
    }
  
}

컴파일 시 표준 에러 (stderr) 메시지

memory.cpp: In function 'void play()':
memory.cpp:16:22: error: expected ';' before ':' token
   16 |             candies++:
      |                      ^
      |                      ;