AC
#include <cstdlib>
#include <cstdio>
#include <cmath>
using namespace std;
int main()
{
int T;
int N;
int a;
scanf("%d",&T);
for(int k=1; k<=T; k++)
{
scanf("%d",&N);
int coun=0;
for(int i=0; i<N; i++)
{
scanf("%d",&a);
coun+=a;
if(a%10==0)
coun+=a/10;
else
coun+=a/10+1;
}
printf("Case #%d: %d\n",k,coun);
}
}
wrong answer
#include <cstdlib>
#include <cstdio>
#include <cmath>
using namespace std;
int main()
{
int T;
int N;
int a;
scanf("%d",&T);
for(int k=1;k<=T;k++)
{
scanf("%d",&N);
int coun=0;
for(int i=0;i<N;i++)
{
scanf("%d",&a);
coun+=ceil(a*(1+0.1));
}
printf("Case #%d: %d\n",k,coun);
}
}
#include <cstdlib>
#include <cstdio>
#include <cmath>
using namespace std;
int main()
{
int T;
int N;
int a;
scanf("%d",&T);
for(int k=1;k<=T;k++)
{
scanf("%d",&N);
int coun=0;
for(int i=0;i<N;i++)
{
scanf("%d",&a);
coun+=ceil(a*(1+0.1));
}
printf("Case #%d: %d\n",k,coun);
}
}
#include <cstdlib>
#include <cstdio>
#include <cmath>
using namespace std;
int main()
{
int T;
int N;
int a;
scanf("%d",&T);
for(int k=1;k<=T;k++)
{
scanf("%d",&N);
int coun=0;
for(int i=0;i<N;i++)
{
scanf("%d",&a);
coun+=ceil(a*(1+0.1));
}
printf("Case #%d: %d\n",k,coun);
}
}
//精度问题