辽宁师范大学 • 张大为@https://daweizh.github.io/noip/
#include <iostream> using namespace std; int main() { int a,b; cin >>a >> b; cout << a+b << endl; return 0; }
#include <iostream> using namespace std; int main() { int a,b,c; cin >>a >> b >> c; cout << (a+b)*c << endl; return 0; }
#include <iostream> using namespace std; int main() { int a,b,c; cin >>a >> b >> c; cout << (a+b)/c << endl; return 0; }
#include <iostream> using namespace std; int main() { int a,b; cin >>a >> b ; cout << a/b << " " << a % b << endl; return 0; }
#include <iostream> #include<iomanip> using namespace std; int main() { double a,b; cin >>a >> b ; cout << fixed << setprecision(9) << a/b << endl; return 0; }
#include <iostream> using namespace std; int main() { double a,b; cin >>a >> b ; printf("%.3f%%",b*100/a); return 0; }
#include <iostream> using namespace std; int main() { double a,b,c,d,x; cin >> x >>a >> b >>c >> d ; printf("%.7f",a*x*x*x+b*x*x+c*x+d); return 0; }
#include <iostream> #include<iomanip> using namespace std; int main() { double f; cin >> f ; //printf("%.7f",a*x*x*x+b*x*x+c*x+d); cout << fixed << setprecision(5) << 5 * (f-32)/9 << endl; return 0; }
#include <iostream> using namespace std; int main() { double pi = 3.14159; double r; cin >> r ; printf("%.4f %.4f %.4f",2*r,2*pi*r,pi*r*r); return 0; }
#include <iostream> using namespace std; int main() { float r1,r2; cin >> r1 >> r2 ; printf("%.2f",1/(1/r1+1/r2)); return 0; }
#include <iostream> using namespace std; int main() { double a,b; cin >> a >> b ; int c = (int)(a / b); printf("%g", a - b*c); return 0; }
#include <iostream> using namespace std; int main() { double pi = 3.14; double r; cin >> r ; printf("%.2f", 4 * pi * r*r*r/3); return 0; }
#include <iostream> using namespace std; int main() { int n; cin >> n ; int h = n /100; printf("%d%d%d", (n - h * 100 )%10, (n - h * 100)/10, n/100 ); return 0; }
#include <iostream> #include <cmath> using namespace std; int main() { double pi = 3.14159; double h,r; cin >> h >> r ; double v = pi * r * r * h / 1000; printf("%g", ceil(20/v) ); return 0; }
#include <iostream> #include <cmath> using namespace std; int main() { double n,x,y; cin >> n >> x >> y ; printf("%g", n-ceil(y/x) ); return 0; }
#include <iostream> #include <cmath> using namespace std; int main() { double xa,ya; double xb,yb; cin >> xa >> ya; cin >> xb >> yb; printf("%.3f", sqrt(pow(xa-xb,2)+pow(ya-yb,2)) ); return 0; }
#include <iostream> #include <cmath> using namespace std; int main() { double x1,y1,x2,y2,x3,y3; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; double l1 = sqrt(pow(x1-x2,2)+pow(y1-y2,2)); double l2 = sqrt(pow(x2-x3,2)+pow(y2-y3,2)); double l3 = sqrt(pow(x1-x3,2)+pow(y1-y3,2)); double p = (l1 + l2 + l3) / 2; printf("%.2f", sqrt(p*(p-l1)*(p-l2)*(p-l3))); return 0; }
#include <iostream> using namespace std; int main() { int a1,a2,n; cin >> a1 >> a2 >> n; printf("%d", a1 + (n-1) * (a2-a1)); return 0; }
#include <iostream> using namespace std; int main() { long a,b; cin >> a >> b; cout << a * b << endl; return 0; }
#include <iostream> #include <cmath> using namespace std; int main() { int n; cin >> n; int p = pow(2,n); cout << p << endl; return 0; }