結果
| 問題 | No.1464 Number Conversion |
| コンテスト | |
| ユーザー |
shiomusubi496
|
| 提出日時 | 2021-04-02 22:08:51 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 346 bytes |
| 記録 | |
| コンパイル時間 | 1,183 ms |
| コンパイル使用メモリ | 211,296 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-19 10:23:29 |
| 合計ジャッジ時間 | 2,286 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
string X;cin>>X;
int f=X.end()-find(X.begin(),X.end(),'.')-1;
if(f==-1)X+='.',f++;
for(int i=f;i<8;i++)X+='0';
X.erase(find(X.begin(),X.end(),'.'));
int x=stoll(X),y=100000000;
int n=gcd(x,y);
x/=n;y/=n;
cout<<x<<'/'<<y<<endl;
}
shiomusubi496