Submission #18035


Source Code Expand

Copy
#include<deque>
#include<list>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<vector>
#include<algorithm>
#include<string>
#include<iostream>
#include<sstream>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
using namespace std;
int main(){
  int i;
  int n;
  cin>>n;
  string s;
  cin>>s;
  int sm=0;
  for(i=0;i<n;++i){
    if(false){
    }else if(s[i]=='A'){
      sm+=4;
    }else if(s[i]=='B'){
      sm+=3;
    }else if(s[i]=='C'){
      sm+=2;
    }else if(s[i]=='D'){
      sm+=1;
    }
  }
  printf("%.10f\n",(double)sm/n);
  return 0;
}

Submission Info

Submission Time
Task A - GPA計算
User hakomo
Language C (GCC 4.4.7)
Score 0
Code Size 627 Byte
Status CE

Compile Error

./Main.c:1: fatal error: deque: No such file or directory
compilation terminated.