#include <iostream> #include <cmath> using namespace std; int main(){ int n; double x,z,c,j,p; int r=0; cin>>n; double x2=0,z2=0; for(int i=0;i<n;i++){ cin>>x>>z>>c; j=sqrt(pow(x-x2,2)+pow(z-z2,2)); p=c*1+c*0.5; r+=j/50*2+ceil(p); } cout<<ceil(r); return 0; } */ /*#include <iostream> #include <cmath> using namespace std; int main(){ int a,b=0,c=0; float q=0; for(int i=1;i<13;i++){ cin>>a; c=300+b; b=c; if(c-a>=100){ if(b-a>0){ q+=3-a/100; b=b-a-q*100; } }else if(c-a<100&&c-a>0){ b=b-a; }else{ cout<<"-"<<i; return 0; } } cout<<b+q*120; return 0; } #include <iostream> using namespace std; int main(){ int a=0,b=0,c=0,s=0,t,dy=0; for(int i=1;i<=12;i++){ cin>>b; if(a+300-b>=0){ t=a+300-b; c=t%100; s+=t-c; }else{ if(dy==0){ dy=i; } } } if(dy==0){ cout<<-dy; return 0; } cout<<s*1.2+a; return 0; } #include <iostream> using namespace std; int main(){ int n,a,b,j; cin>>n; for(int i=0;i<n;i++){ cin>>a>>b; if(a>=90&&a<=140&&b<=90&&b>=60){ j++; } } cout<<j; return 0; }
标签:cout,int,namespace,1073,76,dy,using,main From: https://www.cnblogs.com/As10016/p/17255508.html