# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
172982 | Doda | Lun (COCI19_lun) | C++14 | 2 ms | 380 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 <iostream>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;
int n,zr;
string s;
int main () {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> n >> s;
for (int i = n-2;i>=0;i-=2){
if (s[i] == 'x')
i-=2;
int broj = int (s[i]) - 48;
broj *= 2;
int zbroj = 0;
int r = broj;
while (r != 0){
zbroj += r%10;
r /= 10;
}
broj = zbroj;
zbroj = 10;
while (zbroj >= 10){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |