Go: package main

import (
	"fmt"
	"strconv"
)

func main() {
	for _, leftValue := range MultiplicationTableNum(9) {
		for _, rightValue := range MultiplicationTableNum(9) {
			strLeftVal, strRightVal, strMulti := strconv.Itoa(leftValue), strconv.Itoa(rightValue), strconv.Itoa(Multiplication(leftValue, rightValue))
			fmt.Println(strLeftVal + "x" + strRightVal + "=" + strMulti)
		}
	}
}

func MultiplicationTableNum(num int) []int {
	multiNum := []int{}
	for i := 1; i <= num; i++ {
		multiNum = append(multiNum, i)
	}
	return multiNum
}

func Multiplication(x, y int) int {
	return x * y
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>

using namespace std;

#ifdef unix
#define LL "%lld"
#else
#define LL "%I64d"
#endif

const int maxn=100000;
const long long mo=1000000007;

long long va,vb,vc,l,r;

struct state
{
	long long mod,x,y,z;
	bool operator<(const state &a)const
	{
		return mod<a.mod;
	}
}s[maxn],sum[maxn],bsum[maxn];

int find(int size,long long delta_mod)
{
	if (delta_mod<s[1].mod) return 1;
	if (delta_mod>s[size].mod) return size+1;
	int l=0,r=size;
	while (l+1!=r)
	{
		int m=(l+r)>>1;
		if (s[m].mod>=delta_mod) r=m;
		else l=m;
	}
	return r;
}

long long getans(int size,long long nowp)
{
	long long delta_mod=nowp*va%vb;
	int p=find(size,vb-delta_mod);
	long long deltav=nowp*va/vb%mo;
	long long ans=0;
	long long delta=nowp;
	p--;
	if (p) ans=(ans+sum[p].z+sum[p].x*deltav%mo+delta*sum[p].y%mo+delta*deltav%mo*p%mo)%mo;
	p++;
	deltav++;
	if (p<=size) ans=(ans+bsum[p].z+bsum[p].x*deltav%mo+delta*bsum[p].y%mo+delta*deltav%mo*(size-p+1)%mo)%mo;
	return ans;
}

long long solve(long long p)
{
	if (p==0) return 0;
	int size=(int)sqrt(p);
	for (int a=1;a<=size;a++)
	{
		s[a].mod=(va*a+vc)%vb;
		s[a].x=a;
		s[a].y=(va*a+vc)/vb%mo;
		s[a].z=s[a].x*s[a].y%mo;
	}
	sort(s+1,s+size+1);
	sum[0].x=sum[0].y=sum[0].z=0;
	for (int a=1;a<=size;a++)
		sum[a].x=(sum[a-1].x+s[a].x)%mo,sum[a].y=(sum[a-1].y+s[a].y)%mo,sum[a].z=(sum[a-1].z+s[a].z)%mo;
	bsum[size+1].x=bsum[size+1].y=bsum[size+1].z=0;
	for (int a=size;a>=1;a--)
		bsum[a].x=(bsum[a+1].x+s[a].x)%mo,bsum[a].y=(bsum[a+1].y+s[a].y)%mo,bsum[a].z=(bsum[a+1].z+s[a].z)%mo;
	long long nowp=1,ans=0;
	while (nowp+size-1<=p)
	{
		ans=(ans+getans(size,nowp-1))%mo;
		nowp+=size;
	}
	for (long long a=nowp;a<=p;a++)
		ans=(ans+(va*a+vc)/vb%mo*a%mo)%mo;
	return ans;
}

int main()
{
	scanf(LL LL LL LL LL,&va,&vb,&vc,&l,&r);
	printf(LL "\n",(solve(r)-solve(l-1)+mo)%mo);

	return 0;
}

C++: #include<iostream>
using namespace std;

int main(){

    for(int i=1;i<10;i++){
       for(int j=1;j<10;j++){
           printf("%d+%d=%d", i, j, i*j);
       }
    }
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <ctime>
#include <iterator>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;


int main()
{
    for(int c=1;c<=9;c++)
    {
        for(int c2=1;c2<=9;c2++)
        {
            cout<<c<<"x"<<c2<<"="<<c*c2<<endl;
        }
    }
}

C++: #include<iostream>
using namespace std;

int main(){

	for(int i = 1; i < 10; i++){
		for(int j = 1; j < 10; j++){
			printf("%dx%d=%d\n",i,j,i*j);
		}
	}

    return 0;
}

C++: #include <cstdlib>
using namespace std;

int main(){
	int k = strtol("1000000000000", 0, 10);
	return k == -2147483648;
}

C++: #include<iostream>
using namespace std;

int main() {
	
	for (int i = 1; i < 10; i++) {
		for (int j = 1; j< 10; j++) {
			cout << i << "x" << j << "=" << i*j << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
	for (int i=1;i<=9;i++)
	{
		cout<<i<<'x'<<i<<'='<<i*i;
		/*if (i!=9)*/cout<<endl;
	}
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
signed main(){
for(int i=1;i<=9;i++){
    for(int j=1;j<=9;j++){
        cout<<i<<"x"<<j<<"="<<i*j<<"\n";
    }
}
}

C++: #include<stdio.h>
#include<string.h>
#include<math.h>
#include<ctype.h>

int main()
{
   printf("1x1=1\n1x2=2\n.\n.\n9x8=72\n9x9=81");

    return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
	for(int i=1;i<10;++i){
		for(int j=1;j<10;++j)
			cout << i << "*" << j << "=" << i*j << endl;
	}
	return 0;
}

C++: #include <stdio.h>

int main(void){
    for (int i=1; i<=9; i++){
        for (int j=1; j<=9; j++){
            printf("%dx%d=%d\n", i, j, i*j);
        }
    }     

    return 0;
}

C++: #include <iostream>
using namespace std;

int f(int x, int y){
	cout << x << "x" << y << "=" << x*y << endl;
	return 0;
}

int main(){
	int i;
	int j;
	for(i = 1; i < 10; i++){
		for(j = 1; j < 10; j++){
			f(i, j);
		}
	}
	return 0;
}