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 <stdio.h>

int main(void) {
  int a, b, c, d, e;
  scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
  if(a < 0) printf("%d\n", -a * c + d + b * e);
  else printf("%d\n", d + (b - a) * e);
  return 0;
}

C++: square1001?¨±?????????

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

int main(void)
{
	int a, b, c, d, e,ondo,f;
	scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);
	if (a > 0)
	{
		f = b - a;
		ondo=f*e;
	}
	else if (a < 0)
	{
		ondo = -a*c + d + b*e;
	}
	else if (a == 0)
	{
		ondo = d + b*e;
	}
	printf("%d\n", ondo);
		return 0;
}

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

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

#include <iostream>
using namespace std;

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

    if( a<0)f=d+e*b+(-a)*c;


    if( a=0)f=d+e*b;


    if( a>0)f=(b-a)*e;

    cout<<f<<endl;
    }

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <vector>
#include <iterator>

using namespace std;

long long int const LL_MAX = 10000000000000000; // 10^16

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


}

C++: #include <iostream>
#include <cmath>
using namespace std;
int main(void){
    // Your code here!
 int a,b,c,d,e,x,y,z,h,j,k;
 cin>>a>>b>>c>>d>>e;
 x=abs(a);
 y=x*c;
 h=b-a;
 j=h*e;
 z=b*e;
 if(a<0){
         k=y+d+z;
         cout<<k<<endl;
 }
    else if(a>0){
                 cout<<j<<endl;
                }
 }

C++: #include <iostream>

using namespace std;

int main(void){

  int a,b,c,d,e;
  int total_time;
  
  while(cin >> a >> b >> c >> d >> e){

    total_time=0;

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

    cout << total_time << endl;

  }

  return 0;
}

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

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

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

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

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

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

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

  cout << ans << endl;


  return 0;
}

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

int main() {
    int A,A2,B,C,D,E;
    cin >> A;
    cin >> B;
    cin >> C;
    cin >> D;
    cin >> E;

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

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

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

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

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

	cout << x << endl;
	return 0;
}

C++: //q1.cpp

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

#include <functional>
#include <cassert>

typedef long long ll;
using namespace std;

#define debug(x) cerr << #x << " = " << x << endl;


#define mod 1000000007 //1e9+7
#define INF 1000000000 //1e9
#define LLINF 2000000000000000000LL //2e18
#define SIZE 10000


int main(){
    
  int a,b,c,d,e;
  int ans = 0;
  
  cin >> a >> b >> c >> d >> e;

  ans += min(a,0) * -1 * c;
  a = max(a,0);
  
  if(a == 0) ans += d;

  ans += (b-a) * e;
    
  cout << ans << endl;
  
  return 0;
}

C++: #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(int i = int(a); i < int(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
const long long INFLL = 1LL << 60;
const int INFINT = 1 << 30;
const long long MOD = 1e9 + 7;

template <class T> void vecout(T V) {
    auto t = V.begin();
    while(t != V.end()) {
        cout << *t++;
        if(t != V.end()) cout << " ";
    }
    cout << endl;
};

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int A, B, C, D, E;
    cin >> A >> B >> C >> D >> E;
    cout << (A < 0 ? (-A) * C + D + B * E : (B - A) * E) << endl;
}

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