Problem digits
User PlayVoltz
Submission Time 2023-09-30 08:32:37
Score 0
Max Time N/A
Max Memory N/A

Compile Error

digits.cpp: In function ‘long long int query(long long int, long long int, long long int, long long int, long long int)’:
digits.cpp:29:18: error: conversion from ‘long long int’ to non-scalar type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} requested
29 | string l = query(2*index+1, low, mid, left, right);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
digits.cpp:30:18: error: conversion from ‘long long int’ to non-scalar type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} requested
30 | string r = query(2*index+2, mid+1, high, left, right);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
digits.cpp:31:14: error: no match for ‘operator%’ (operand types are ‘std::__cxx11::basic_string<char>’ and ‘long long int’)
31 | return (l+r)%MOD;
| ~~~~~^~~~
| | |
| | long long int
| std::__cxx11::basic_string<char>