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 <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,d,e;
  int s=0;
  cin >>a>>b>>c>>d>>e;
  if(a<0){
    s+=(a*c*-1)+d;
  }
  s+=(b-a)*e;
  cout <<s<<endl;
  return 0;
}

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

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

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

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

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <string.h>

using namespace std;

int main (void)
{
	long n,a,b,x,y,z,p,q,r;
	cin >> n >> a >> x >> y >> z;
	
	if (n < 0)
	{
		p = 0;
		p = x * (0 - n);
	
	
		q = 0;
		q = y;
		
		r = 0;
		r = z * a;
		cout << p + q + r << endl;	
	}
	else if (n == 0)
	{
		p = 0;
		q = 0;
				q = y;
				
				r = 0;
				r = z * a;
				cout << p + q + r << endl;	
	}
	else if (n > 0)
	{p =0 ;
	q = 0;
		r = z * (a - n);
						cout << p + q + r << endl;	
			}
	}

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

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

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

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

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

C++: #include<iostream>

using namespace std;

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

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

  if(a<0){
    while(a!=0){
      a++;
      total+=c;
    }
  }

  if(a==0)
    total+=d;

  while(a!=b){
    a++;
    total+=e;
  }

  cout<<total<<endl;
}

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

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<(o)<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);

int a, b, c, d, e;
int f(int t) {
	int ret = 0;
	if (t < 0)ret += -t*c, t = 0;
	if (t == 0)ret += d;
	ret += (100 - t)*e;
	return ret;
}

signed main() {
	cin >> a >> b >> c >> d >> e;
	cout << (f(a)-f(b)) << endl;
	return 0;
}

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

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

using namespace std;

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

  int ans = 0;
  if (a < 0) ans += -a * c;
  a = max(a, 0);
  if (a == 0) ans += d;
  ans += (b - a) * e;

  cout << ans << endl;

  return 0;
}

C++: #include <iostream>

int main() {
	int a, b, c, d, e;
	std::cin >> a >> b >> c >> d >> e;

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

	std::cout << tTime << std::endl;

	return 0;
}

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

C++: #include <bits/stdc++.h>
  
using namespace std;
  
#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define pb push_back
#define all(r) r.begin(),r.end()
#define rall(r) r.rbegin(),r.rend()
#define fi first
#define se second
  
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
 
const int INF = 1e9;
const ll MOD = 1e9 + 7;
double EPS = 1e-8;

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

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

using namespace std;

int main() {

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

	int counter = 0;
	if (a <= 0) {
		counter += -a * c + d + b * e;
	}
	else {
		counter += (b-a) * e;
	}
	
	cout << counter << endl;
}

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

using namespace std;

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

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 << -(a)*c + d + b*e << endl;
    }
    else
    cout <<(b - a)*e << endl;
    
}

C++: // 電子レンジ

#include <iostream>
using namespace std;

bool cond1(bool frozen, int tmp_t);
bool cond2(bool frozen, int tmp_t);
bool cond3(bool frozen);


int main() {
    int Ac; // 元の温度 Ac < Bc
    int Bc; // 目的の温度
    int Ct; // 凍った肉を1度温める時間
    int Dt; // 凍った肉を解凍するのにかかる時間
    int Et; // 凍ってない肉を1度温める時間

    int time = 0; // 肉を温めるのにかかる時間
    int tmp_t; // 途中の温度
    bool frozen; // 凍ってるか？

    cin >> Ac >> Bc >> Ct >> Dt >> Et;
    tmp_t = Ac;

    // set frozen, Aは0じゃない
    if (Ac > 0) frozen = false;
    if (Ac < 0) frozen = true;
    if (Ac == 0) return 1;


    while (tmp_t != Bc) {
        if (cond1(frozen, tmp_t)) {
            time += Ct;
            tmp_t++;
        } else if (cond2(frozen, tmp_t)) {
            time += Dt;
            frozen = false;
        } else if (cond3(frozen)) {
            time += Et;
            tmp_t++;
        }
    }
    cout << time << "\n";
    return 0;
}

bool cond1(bool frozen, int tmp_t) {
    // 肉が凍っていて、温度が0度より小さい
    return (frozen & (tmp_t < 0));
}

bool cond2(bool frozen, int tmp_t) {
    // 肉が凍っていて、温度がちょうど0度
    return (frozen & (tmp_t == 0));
}

bool cond3(bool frozen) {
    // 肉が凍っていない
    return !(frozen);
}

C++: #include "bits/stdc++.h"
#define rep(i,a,n) for(int i = (a);i < (n);i++)
typedef unsigned long long ull;
typedef long long ll;
using namespace std;

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