Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: YourLocalZ
Problemset: เลขดวง
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-09 16:43:47
#include <iostream>
using namespace std;
int main()
{
int x,y,z,s=0;
cin >> x >> y >> z;
if((z+y)%7!=2) s+=z-1;
if((z+y)%7!=1) s+=z+1;
if(z>7) s+=z-7;
if(z<=x-7) s+=z+7;
cout << s;
}