Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func main() {
	scanner.Split(bufio.ScanWords)
	startTemp, _ := nextInt()
	targetTemp, _ := nextInt()
	deltaFrozen, _ := nextInt()
	deltaZero, _ := nextInt()
	deltaNotFrozen, _ := nextInt()

	requiredTime := 0

	if startTemp < 0 {
		requiredTime += -startTemp * deltaFrozen
	}
	if startTemp <= 0 {
		requiredTime += deltaZero
	}
	if startTemp <= 0 {
		requiredTime += targetTemp * deltaNotFrozen
	} else {
		requiredTime += (targetTemp - startTemp) * deltaNotFrozen
	}

	fmt.Println(requiredTime)
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a, b, c, d, e, ans;
    cin >> a >> b >> c>> d >> e;
    if (b > 0) {
        if (a < 0) {
            ans = (a * -1)* c + d + b * e;
        } else {
            ans = (b - a) * e;
        }
    } else {
        ans = (b -a) * c;
    }
    cout << ans << endl;
}

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

int main()
{
  int A,B,C,D,E;
  cin >> A >> B >> C >> D >> E;
  int t = 0;
  if(A < 0){
      t = (0 - A) * C + B * E + D;
      
  }else if(A > 0){
      t = (B - A) * E;
  }
  
  cout << t << endl;
  
  
  return 0;
      
}

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,d,e,sum;
	scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
	if(a<0){
		sum=a*-1*c;
		sum+=d;
		sum+=e*b;
	}
	else{
		sum=(b-a)*e;
	}
	printf("%d\n",sum);
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,b,c,d,e;
    cin>>a>>b>>c>>d>>e;
    if(a>0){
        cout<<(b-a)*e<<endl;
    }
    else{
        cout<<b*e+d-a*c<<endl;
    }
    return 0;
}

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

int main()
{
    int a, b, c, d, e;

    cin >> a >> b >> c >> d >> e;

    int sum;
    if( a < 0  )
        sum = a * -1 * c + d + b * e;
    else if( a == 0 )
        sum = d + b * e;
    else
        sum = ( b - a ) * e;

    cout << sum << endl;

    return 0;
}

C++: //  AOJ1 microwave
#include <iostream>
using namespace std;
int main(int argc,const char * argv[]){
    int A,B,C,D,E,F,c,e;
    cin>>A>>B>>C>>D>>E;
    if(A<0){
        c=-A*C;
        e=B*E;
        F=c+D+e;
    }else if(A>0){
        c=0;
        e=(B-A)*E;
        F=e;
    }else{
        c=0;
        e=B*E;
        F=D+E;
    }
    cout<<F<<endl;
    return 0;
}

C++: #include<stdio.h>
int main(){
	int a,b,c,d,e,t=0;
	scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);
	if(a<0&&b>0){
		t-=a*c;
		t+=d;
		t+=b*e;
	}
	else{
		t+=(b-a)*e;
	}
	printf("%d\n",t);
	return 0;
}

C++: #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
 
//const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
//const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
 
int main()
{
	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	int ans = 0;

	while (a < 0){
		ans += c;
		a++;
	}

	if (a == 0){
		ans += d;
	}

	while (a < b){
		ans += e;
		a++;
	}

	cout << ans << endl;


}

C++: #include <bits/stdc++.h>
#define dum(x) cout<<#x<<'='<<x<<endl
using namespace std;

int main() {
  int a, b, c, d, e;
  cin >> a >> b >> c >> d >> e;
  int ans;
  if (a <= 0) {
    ans = abs(a) * c;
    ans += d;
    ans += b * e;
  } else {
    ans = (b - a) * e;
  }
  cout << ans << endl;
}

C++: //2016
#include<iostream>
using namespace std;
int main(void){
	int a,b,c,d,e,t=0;
	cin>>a;
	cin>>b;
	cin>>c;
	cin>>d;
	cin>>e;
	if(a<0){
		while(a<0){
			t+=c;
			a++;
		}
		if(a==0){
			t+=d;
		}
		while(a<b){
			t+=e;
			a++;
		}
	}
	else{
		while(a<b){
			t+=e;
			a++;
		}
	}
	cout<<t<<endl;
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a,b,c,d,e,f,g,h,i,x,j;
    cin>>a>>b>>c>>d>>e;
    x=0;
    if(a<0){
        x=-a;
    }
    f=b-a;
    g=f*e;
    h=x*c;
    j=b*e;
    if(a<0){
        i=j+d+h;
        cout<<i<<endl;
    }
    else if(a>0){
        cout<<g<<endl;
    }
    
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b,c,d,e,k=0;
	cin>>a>>b>>c>>d>>e;
	while(a<0){
		k+=c;
		a+=1;
	}
	if(a==0){
		k+=d;
	}
	while(a<b){
		k+=e;
		a+=1;
	}
	cout<<k<<endl;
}

C++: #include<stdio.h>
int main()
{
	int a,b,c,d,e;
	scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
	if(a<0&&b<=0){
		printf("%d\n",c*(b-a));
	}else if(a<0&&b>0){
		printf("%d\n",(-a)*c+d+b*e);
	}else{
		printf("%d\n",(b-a)*e);
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
 
int main(){

  int a, b, c, d, e;
  int ans=0;

  cin>>a>>b>>c>>d>>e;

  if(a<0){
    ans-=c*a;
    a=0;
  }
  if(a==0) ans+=d;
  ans+=(b-a)*e;

  cout<<ans<<endl;
  
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
	int A, B, C, D, E, t = 0;
	cin>>A>>B>>C>>D>>E;
	
	if (B < 0){
		t +=  (B - A) * C * -1;
		cout<<t<<endl;
		return 0;
	} else if(A < 0) {
		t += A * C * -1;
		A = 0;
	}
	if(B == 0){
		t += D;
		cout<<t<<endl;
		return 0;
	}else if (A == 0){
		t += D;
	}

	t += E * (B - A);
	
	cout<<t<<endl;
			
	
	return 0;
}

C++: //============================================================================
// Name        : JOI.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;
int A,B,C,D,E;
int main() {
	cin>>A>>B>>C>>D>>E;
	int R=0;
	if(A>0)R=(B-A)*E;
	if(A<0)R=(0-A)*C+D+B*E;
	if(A==0)R=D+B*E;

	cout<<R<<endl;


	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a=0;
    int b=0;
    int c=0;
    int d=0;
    int e=0;
    int cold=0;
    int f=0;
    int g=0;
    cin>>a>>b>>c>>d>>e;
    if(a<=0){
      if(a==0){
         f=d+b*e;
         cout<<f<<endl;
      }else{
        while(a<0){
            a++;
            cold++;
        }
        f=cold*c+d+b*e;
        cout<<f<<endl;
      }    
    }else{
        g=b-a;
        f=g*e;
        cout<<f<<endl;
    }
    
}

C++: #include <iostream>
using namespace std;
int main(void){
   int a,b,c,d,e;
   cin >> a >> b >>c >>d>>e;
   
   if (a<0) cout << c*(-a)+d+b*e<<endl;
   else  cout << (b-a)*e <<endl;
}

C++: #include<bits/stdc++.h>
using namespace std;


int main(){
  int A,B,C,D,E;
  int t = 0;

  cin >> A >> B >> C >> D >> E;

  if(A < 0){
    t += A*(-1)*C;
    A = 0;
  }

  if(A == 0){
    t += D;
    A = 0;
    t += B* E;
  }

  if(A > 0){
    t += (B - A) * E;
  }

  cout << t << endl;

  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
    printf("%.9999999999999d",100);
    }

C++: #include <iostream>
using namespace std;
int main(void){
   int A,B,C,D,E,a,b;
   cin >> A >> B >> C >> D >> E;
   if(A<0){
       a=-(A*C);
       b=B*E;
       cout << a+D+b << endl;
   }else if(A>0){
       a=B-A;
       b=a*E;
       cout << b << endl;
   }else if(A==0){
       a=B*E;
       cout << D+a << endl;
   }
 }

C++: #include <iostream>
using namespace std;
int main(void){
    int A,B,C,D,E;
    cin >> A >> B >> C >> D >> E;
    int T = 0;
    
    if(A <= 0){
        int a = (-1)*A;
        T = a*C + B*E + D;
        cout << T << endl;
    }
    else{
        int b = B - A;
        T = b*E;
        cout << T << endl;
    }
   
}

C++: #include <bits/stdc++.h>

using namespace std;

int main() {
	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	int ans = 0;
	if (a <= 0) {
		ans = (-a) * c + d + b * e;
	} else {
		ans = (b - a) * e;
	}
	cout << ans << endl;
}