Submission #180678


Source Code Expand

include<iostream>
using namespace std;
int main()
{
  // 整数の入力
  int n;
  cin >> n;
  int out = 0;
  int ai = 0;
  int i;
  for(i = 0;i<n;i++){
    cin >> ai;
    if(ai == 2 || ai == 4 || ai == 8){
      out += 1;
    }
    if(ai == 5){
      out += 2;
    }
    if(ai == 6){
      out +=3;
    }
  }
   cout << out << endl;
}

Submission Info

Submission Time
Task B - 花占い
User hirahira
Language C++ (G++ 4.6.4)
Score 0
Code Size 361 Byte
Status CE

Compile Error

./Main.cpp:1:1: error: ‘include’ does not name a type
./Main.cpp: In function ‘int main()’:
./Main.cpp:7:3: error: ‘cin’ was not declared in this scope
./Main.cpp:23:4: error: ‘cout’ was not declared in this scope
./Main.cpp:23:19: error: ‘endl’ was not declared in this scope