227952026-01-15 18:37:29FintaTihamerFasor (40)cpp17Wrong answer 0/401ms560 KiB
#include <iostream>
#include <fstream>
using namespace std;
int a[2][28];
/*void I(int x, bool y, bool z){ //z true fent, false lent, x--hova, y--elvan-e forditva,,true--igen, nem--false
    if(y && z){ a[0][x]=1; a[0][x+1]=1; }
    if(y && !z){ a[1][x]=1; a[1][x+1]=1; }
    if(!y && z || !y && !z){ a[0][x]=1; a[1][x]=1; }
}*/
int main()
{   int n;
    cin>>n;
    /*for(int i=0; i<2; i++){
        for(int j=0; j<28; j++){
            cout<<a[i][j]<<" ";
        }
        cout<<"\n";
    }*/
    int db=0;
    while(n>0){
        if((n+1)%3==0)     { db+=2;  n=n-2;}
        else if((n+2)%3==0){ db+=1;  n=n-1;}
        else if(n%3==0)    { db+=5;  n=n-3;}
    }
    cout<<db;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/01ms316 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/21ms336 KiB
8Wrong answer0/21ms316 KiB
9Wrong answer0/21ms340 KiB
10Wrong answer0/21ms560 KiB
11Wrong answer0/21ms316 KiB
12Wrong answer0/21ms316 KiB
13Wrong answer0/21ms316 KiB
14Wrong answer0/21ms316 KiB
15Wrong answer0/21ms316 KiB
16Wrong answer0/21ms316 KiB
17Wrong answer0/21ms316 KiB
18Wrong answer0/21ms508 KiB
19Wrong answer0/21ms316 KiB
20Wrong answer0/21ms316 KiB
21Wrong answer0/21ms500 KiB
22Wrong answer0/21ms316 KiB