AtCoder Beginner Contest 010

Submission #1050491

Source codeソースコード

#include <iostream>
#include <string>
#include <algorithm>
#include <climits>
#include <map>
using namespace std;

int memo[1000010] = {0,0,1};
    
int main(void){
    
    int n,ans=0,a;
    cin >> n;
    int arr[] = {0,1,0,1,2,3};
    
    for(int i = 0; i < n; i++){
        cin >> a;
        a--;
        a=a%6;
        ans += arr[a];
    }
    
    cout << ans << endl;
    
    
}

Submission

Task問題 B - 花占い
User nameユーザ名 nasatame
Created time投稿日時
Language言語 C++ (G++ 4.6.4)
Status状態 AC
Score得点 100
Source lengthソースコード長 414 Byte
File nameファイル名
Exec time実行時間 20 ms
Memory usageメモリ使用量 980 KB

Test case

Set

Set name Score得点 / Max score Cases
All 100 / 100 test_1.txt,test_112358.txt,test_1379137913.txt,test_1414213562.txt,test_1732151817.txt,test_2.txt,test_2236167977.txt,test_2645751311.txt,test_3.txt,test_3141592653.txt,test_4.txt,test_5.txt,test_6.txt,test_6666666666.txt,test_7.txt,test_73.txt,test_8.txt,test_9.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
sample_01.txt AC 20 ms 752 KB
sample_02.txt AC 18 ms 924 KB
test_1.txt AC 17 ms 796 KB
test_112358.txt AC 19 ms 796 KB
test_1379137913.txt AC 19 ms 792 KB
test_1414213562.txt AC 18 ms 920 KB
test_1732151817.txt AC 19 ms 788 KB
test_2.txt AC 17 ms 796 KB
test_2236167977.txt AC 19 ms 796 KB
test_2645751311.txt AC 20 ms 920 KB
test_3.txt AC 19 ms 796 KB
test_3141592653.txt AC 19 ms 916 KB
test_4.txt AC 19 ms 920 KB
test_5.txt AC 19 ms 792 KB
test_6.txt AC 17 ms 796 KB
test_6666666666.txt AC 18 ms 796 KB
test_7.txt AC 19 ms 980 KB
test_73.txt AC 18 ms 840 KB
test_8.txt AC 20 ms 920 KB
test_9.txt AC 20 ms 796 KB