Skip to content

Commit 7c3954e

Browse files
author
npofsi
committed
ggs ddu
1 parent 5a99a99 commit 7c3954e

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

lg1089/main.cpp

+19-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,32 @@
66
using namespace std;
77

88
int red[13];
9-
9+
int inhand=0;
10+
int now=0;
1011
int main(){
1112

1213
for(int i=1;i<=12;i++){
1314
scanf("%d",&red[i]);
15+
now+=300;
16+
17+
if((now-red[i])>=100){
18+
19+
20+
//cout<<"*"<<now<<endl;
21+
inhand+=((now-red[i])/100)*100;
22+
}else{
23+
if((now-red[i])<0){
24+
cout<<"-"<<i;
25+
return 0;
26+
}
27+
28+
}
29+
now=(now-red[i])%100;
1430
};
1531

1632

33+
printf("%.0f",now+inhand*(1.2));
34+
1735

1836
return 0;
1937
}

lg1089/main.exe

1.91 MB
Binary file not shown.

0 commit comments

Comments
 (0)