mirror of
https://github.com/Hizenberg469/Algorithms-snippets.git
synced 2026-04-19 14:42:23 +03:00
5 lines
92 B
C++
5 lines
92 B
C++
template<typename T>
|
|
T modAdd(T a,T b,T M=(T)1e9+7){
|
|
return ((M+a%M)%M+(M+b%M)%M)%M;
|
|
}
|