Submission #00001


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include<bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<n;i++)
#define SFOR(i,a,b) for(int i=a;i<b;i++)
#define elif(a) else if(a)
#define INF INT_MAX
#define F first
#define S second
#define endl '\n'
using namespace std;
typedef long long ll;
typedef pair<int,int>P;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n=0,a,b,c,d,e;
cin>>a>>b>>c>>d>>e;
if(a<0){
n=abs(a)*c;
a=0;
}
if(a==0) n+=d;
n=n+(b-a)*e;
cout<<n<<endl;
return 0;
}

ステータス

項目 データ
問題 0001 - 電子レンジ (Microwave)
ユーザー名 Zzz..ei1704..Zzz
投稿日時 2018-11-21 16:32:40
言語 C++14
状態 Accepted
得点 100
ソースコード長 498 Byte
最大実行時間 25 ms
最大メモリ使用量 604 KB

セット

セット 得点 Cases
1 set1 20 / 20 *t1*1.txt
2 set2 20 / 20 *t1*2.txt
3 set3 20 / 20 *t1*3.txt
4 set4 20 / 20 *t1*4.txt
5 set5 20 / 20 *t1*5.txt

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
2017-yo-t1-in1.txt AC 21 ms 604 KB
1
2017-yo-t1-in2.txt AC 25 ms 432 KB
2
2017-yo-t1-in3.txt AC 19 ms 392 KB
3
2017-yo-t1-in4.txt AC 24 ms 468 KB
4
2017-yo-t1-in5.txt AC 22 ms 548 KB
5