# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
104100 | wiritos1 | Lun (COCI19_lun) | C++98 | 2 ms | 384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a;
string b;
cin>>a>>b;
bool p2=false;
int sum=0;
for(int c=0;c<a-1;c++)
{
if(b[c]=='x')
{
if(c%2==(a-1)%2)
{
p2=false;
}
else
{
p2=true;
}
}
else
{
if(c%2==(a-1)%2)
{
sum+=b[c]-'0';
}
else
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |