提出 #6547515
ソースコード 拡げる
#include<bits/stdc++.h>
using namespace std;
template<class S, class T> inline S min_L(S a,T b){
return a<=b?a:b;
}
inline void rd(int &x){
int k, m=0;
x=0;
for(;;){
k = getchar_unlocked();
if(k=='-'){
m=1;
break;
}
if('0'<=k&&k<='9'){
x=k-'0';
break;
}
}
for(;;){
k = getchar_unlocked();
if(k<'0'||k>'9'){
break;
}
x=x*10+k-'0';
}
if(m){
x=-x;
}
}
inline void wt_L(char a){
putchar_unlocked(a);
}
inline void wt_L(int x){
char f[10];
int m=0, s=0;
if(x<0){
m=1;
x=-x;
}
while(x){
f[s++]=x%10;
x/=10;
}
if(!s){
f[s++]=0;
}
if(m){
putchar_unlocked('-');
}
while(s--){
putchar_unlocked(f[s]+'0');
}
}
int main(){
int A, B, N, res;
rd(N);
rd(A);
rd(B);
res =min_L(A*N, B);
wt_L(res);
wt_L('\n');
return 0;
}
// cLay varsion 20190721-1
// --- original code ---
// {
// int N, A, B;
// int res;
//
// rd(N,A,B);
// res = min(A*N, B);
// wt(res);
// }
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Parking |
| ユーザ | LayCurse |
| 言語 | C++14 (GCC 5.4.1) |
| 得点 | 100 |
| コード長 | 1093 Byte |
| 結果 | AC |
| 実行時間 | 1 ms |
| メモリ | 256 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01.txt | AC | 1 ms | 256 KiB |
| 02.txt | AC | 1 ms | 256 KiB |
| 03.txt | AC | 1 ms | 256 KiB |
| 04.txt | AC | 1 ms | 256 KiB |
| 05.txt | AC | 1 ms | 256 KiB |
| 06.txt | AC | 1 ms | 256 KiB |
| 07.txt | AC | 1 ms | 256 KiB |
| sample_01.txt | AC | 1 ms | 256 KiB |
| sample_02.txt | AC | 1 ms | 256 KiB |
| sample_03.txt | AC | 1 ms | 256 KiB |