結果
| 問題 |
No.1464 Number Conversion
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-03 02:11:43 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 708 bytes |
| コンパイル時間 | 1,529 ms |
| コンパイル使用メモリ | 164,940 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2024-12-24 02:34:18 |
| 合計ジャッジ時間 | 35,831 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 TLE * 11 |
ソースコード
//ethan_h
#include<bits/stdc++.h>
using namespace std;
#define ll long long
/*void test(){
ll n,t;cin>>n>>t;
ll s=0;
//string s;cin>>s;
vector<ll>a(n);
for(ll i=0;i<n;i++){
cin>>a[i];
s+=a[i];}
if(s/t){
int p;
p=s/t;
t-=(p*t);
for(ll i=0;i<n;i++){
if(t>=a[i]){
p++;
t-=a[i];
}
}
cout<<p<<endl;
}
else{
int p=0;
for(ll i=0;i<n;i++){
if(t>=a[i]){
p++;
t-=a[i];
}
}
cout<<p<<endl;
}
*/
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
double x;
cin>>x;
int p=1;
while(x-int(x)!=0){
x*=double(10);
p*=10;
}
int k=int(x);
int s=__gcd(k,p);
k/=s;
p/=s;
cout<<k<<"/"<<p;
return 0;}