Skip to content

Instantly share code, notes, and snippets.

@steve-chavez
Created July 28, 2013 01:15
Show Gist options
  • Save steve-chavez/6096953 to your computer and use it in GitHub Desktop.
Save steve-chavez/6096953 to your computer and use it in GitHub Desktop.
Timus 1001
#include <iostream>
#include <math.h>
#include <stack>
#include <iomanip>
#include <stdio.h>
using namespace std;
typedef unsigned long long llu;
int main(){
// freopen("in.txt","r",stdin);
// freopen("out.txt","w",stdout);
llu x;
stack<llu> xs;
while (scanf("%llu", &x) != -1) {
xs.push(x);
}
while (!xs.empty()){
printf("%.4f\n", sqrt(xs.top()));
xs.pop();
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment