- 津津的储蓄计划
- 2016-03-15 13:27:18 @
编译成功
测试数据 #0: Accepted, time = 0 ms, mem = 480 KiB, score = 10
测试数据 #1: WrongAnswer, time = 0 ms, mem = 476 KiB, score = 0
测试数据 #2: Accepted, time = 0 ms, mem = 480 KiB, score = 10
测试数据 #3: WrongAnswer, time = 0 ms, mem = 476 KiB, score = 0
测试数据 #4: Accepted, time = 0 ms, mem = 476 KiB, score = 10
测试数据 #5: WrongAnswer, time = 0 ms, mem = 480 KiB, score = 0
测试数据 #6: Accepted, time = 0 ms, mem = 484 KiB, score = 10
测试数据 #7: WrongAnswer, time = 0 ms, mem = 476 KiB, score = 0
测试数据 #8: Accepted, time = 0 ms, mem = 480 KiB, score = 10
测试数据 #9: Accepted, time = 0 ms, mem = 480 KiB, score = 10
WrongAnswer, time = 0 ms, mem = 484 KiB, score = 60
代码
#include<stdio.h>
int main() {
long c=0,s=0,y,i,t;
for(i=1;i<=12;i++) {
scanf("%ld",&y);
t=s+300-y;
if(t<0)
printf("-%ld",i);
c+=t-(t%100);
s=t%100;
}
printf("%ld",c+c*20/100+s);
return 0;
}
0 条评论
目前还没有评论...