delete pics to save space
This commit is contained in:
23
history_source/信息学奥赛一本通/1.4.1.16.cpp
Normal file
23
history_source/信息学奥赛一本通/1.4.1.16.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include<cstdio>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
int y[12];
|
||||
for(int i=0;i<12;i++) scanf("%d",y+i);
|
||||
int add=0,c=0;
|
||||
for(int i=0;i<12;i++)
|
||||
{
|
||||
add+=300;
|
||||
add-=y[i];
|
||||
if(add<0)
|
||||
{
|
||||
printf("-%d\n",i+1);
|
||||
return 0;
|
||||
}
|
||||
c+=add/100;
|
||||
add=add%100;
|
||||
}
|
||||
printf("%d\n",c*120+add);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user