Submission #3643944


Source Code Expand

#include<string>
#include<iostream>
using namespace std;
long long b[10]={1,2,3,4,5,6},now;
int main()
{
    long long c
    cin>>c;
    c=c%30;
    for(int s=0;s<c;s++)
    {
        swap(b[now],b[now+1]);
        now++;
        if(now==5)now=0;
    }
    for(int s=0;s<6;s++)
    {
        cout<<b[s];
    }
    cout<<endl;
    return 0;
}

Submission Info

Submission Time
Task C - 入れ替え
User luogu_bot2
Language C++ (GCC 5.4.1)
Score 0
Code Size 341 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:8:5: error: expected initializer before ‘cin’
     cin>>c;
     ^
./Main.cpp:9:5: error: ‘c’ was not declared in this scope
     c=c%30;
     ^