Problem: 10071 - Back to High School Physics
Solution: C++
Hints: http://www.algorithmist.com/index.php/UVa_10071
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <map>
#include <sstream>
#include <utility>
#include <set>
#include <math.h>
usingnamespace std;
int main()
{
int a, b;
char sor[20];
while(gets(sor) != NULL)
{
sscanf(sor,"%d %d",&a,&b);
printf("%d\n",2*a*b);
}
return 0;
}
No comments:
Post a Comment