#include using namespace std; int main(){ double X;cin >> X; double anser = X; int count = 1; while(anser < 1){ anser *= 10; count *= 10; } //cout << anser << count; bool can_a = true; bool can_b = true; int anser_int = anser; while(can_a || can_b){ if(anser_int%2 == 0 && count%2 == 0){ anser_int/=2; count/=2; } else can_a = false; if(anser_int%5 == 0 && count%5 == 0){ anser_int/=5; count/=5; } else can_b = false; } cout << anser_int << '/' << count << endl; }