Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
29297 | 惠子铭 | 救援 | C++ | Accepted | 0 MS | 188 KB | 395 | 2023-10-27 15:50:05 |
#include <stdio.h> #include <math.h> int main() { int n,p,i,re; float x,y,sum=0,dis,temp; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%f %f %d",&x,&y,&p); dis=sqrt(x*x+y*y); temp=dis/50.0; sum=sum+1.5*p+temp*2; } re=sum; if(sum-re>0) { re++; } printf("%d\n",re); return 0; }