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(){
    int a[5];
    int ans=0;
    
    for(int i=0;i<5;i++){
        cin>>a[i];
    }
    
    if(a[0]<0){
        a[0]=-1*a[0];
        ans+=a[0]*a[2];
        ans+=a[3];
    }
    
    else{
        ans+=(a[1]-a[0])*a[4];
    }
    cout<<ans<<endl;
    
}

C++: 
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;

int a, b, c, d, e;

int main(void)
{
	scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);
	int time = 0;
	bool frozen = (a < 0);
	while (a != b)
	{
		if (frozen)
		{
			if (a != 0)
			{
				time += c;
				++a;
			}
			else
			{
				time += d;
				frozen = false;
			}
		}
		else
		{
			time += e;
			++a;
		}
	}
	printf("%d\n", time);
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,d,e,ans=0,ra=0;
  cin>>a>>b>>c>>d>>e;
  if(a<0){
    while(1){
      ans+=c;
      a++;
      if(a==0) break;
    }
  }
  if(a==0){
    ans+=d;
  }
  while(1){
    if(b==a) break;
    a++;
    ans+=e;
  }
  cout<<ans<<endl;
    
  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,t;
	t=0;
	cin>>a>>b>>c>>d>>e;
	if(a<=0) b++;
	while(a<b){
		if(a<0){
			t+=c;
			a++;
		}
		else if(a==0){
			t+=d;
			a++;
		}
		else if(a>0){
			t+=e;
			a++;
		}
	}
	cout<<t<<endl;
	return 0;
}

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

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

int main() {
  int A, B, C, D, E;
  int tem, res, temp;

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

  if(A > 0) {
    tem = B - A;
    res = tem *	E;
  }
  else {
    res	= A * -1 * C;
    temp = B * E;
    res = res + temp + D;
  }

  cout << res << endl;
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int demeat,sec,hutuusec,kaitousec,purpose,ans=0;
	int i=0,x=1;
	cin>>demeat>>purpose>>sec>>kaitousec>>hutuusec;

	if(demeat<0){
		ans+=kaitousec;
		for(i=demeat;i<0;i++){
			ans+=sec;
		}
		for(i=0;i<purpose;i++){
			ans+=hutuusec;
		}
	}
	else if(demeat>0){
	for(int j=demeat;j<purpose;j++){
		ans+=hutuusec;
		}
	}


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

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, t = 0;
	cin>>A>>B>>C>>D>>E;
	
	if(A < 0) {
		t += A * C * -1;
		A = 0;
	}
	if(A == 0){
		t += D;
	}
	 t += E * B;
	
	cout<<t<<endl;
			
	
	return 0;
}

C++: #include <stdio.h>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>

using namespace std;


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

	scanf("%d",&A);
	scanf("%d",&B);
	scanf("%d",&C);
	scanf("%d",&D);
	scanf("%d",&E);

	if(A <= 0){
		sum += (0-A)*C;
		sum += D;
		sum += B*E;
	}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;

    int ans;
    if(A<0){
        ans=-A*C+D+B*E;
    }
    if(A>0){
        ans=(B-A)*E;
    }
    cout << ans << endl;
    return 0;
}

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

int main(void){
  int MeatTemp;
  int TargetTemp;
  int FrozenStateTime;
  int TransrateTime;
  int NotFrozenStateTime;

  cin >> MeatTemp >> TargetTemp >> FrozenStateTime
      >> TransrateTime >> NotFrozenStateTime;

  if(MeatTemp >= 0){
    cout << (TargetTemp - MeatTemp) * NotFrozenStateTime << endl;
  }else{
    cout << (TargetTemp*NotFrozenStateTime)-(MeatTemp*FrozenStateTime)+TransrateTime << endl;
  }
}

C++: #include<stdio.h>
#include<string.h>
#include<math.h>
int main(void)
{
	int a[5],s,d=0,f,g,h,j,i;
	for(i=0;i<5;i++) scanf("%d",&a[i]);
	if(a[0]<0){
		s=a[0]*-1;
		d+=s*a[2];
		a[0]=0;
	}
	if(a[0]==0)	d+=a[3];
	s=a[1]-a[0];
	d+=s*a[4];
	printf("%d\n",d);
	return 0;
}

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

int main(){
    printf("%.9999999999999lf",100.0);
    }

C++: #include <bits/stdc++.h>
#define ii pair <int , int>
#define is pair <int, string>
#define ic pair <int, char>
#define ll long long
#define mx 100000
#define sf scanf
#define sf(n) scanf("%d",&n)
#define pf printf
using namespace std;
vector <int> v;

/*int intConvert(string s){
    int n;
    stringstream geek(s);
    geek >> n;
    return n;
}*/

/*string strConvert(int n){
    string s;
    stringstream ss;
    ss << n;
    s=ss.str();
    return s;
}*/


int main(){
    int a,b,c,d,e;
    scanf("%d %d %d %d %d",&a, &b, &c, &d, &e);

    if(a<=0){
        int ans = (c*abs(a)+d);
        int ans1 = b*e;
        pf("%d\n",(ans1+ans));
    }
    else{
        int ans = (b-a)*e;
        pf("%d\n",ans);
    }

    return 0;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int a,b,c,d,e;
  cin>>a>>b>>c>>d>>e;
  cout<<(a<0?-a*c:0)+(a<=0?d:0)+(b-max(0, a))*e<<endl;
}

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

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

int main() {
	int A, B, C, D, E, time=0;
	cin >> A >> B >> C >> D >> E;
	while(A<0){
		time += C;
		A++;
	}
	if(A==0) time += D;
	while(A>=0 && A<B){
		time += E;
		A++;
	}
	cout << time << endl;
	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 = (-1*a) * c;
        a = 0;
    }
    if (a == 0) {
        ans += d;
    }

    ans += (b - a) * e;

    cout << ans << endl;
}