結果

問題 No.1902 AC Ratio
ユーザー takabatake2911
提出日時 2022-12-16 19:16:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 386 bytes
コンパイル時間 528 ms
コンパイル使用メモリ 63,460 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-16 00:12:58
合計ジャッジ時間 1,361 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
    string s;
    cin >> s;
    string delimiter = "/";
    size_t pos = 0;
    string t;
    while ((pos = s.find(delimiter)) != string::npos)
    {
        t = s.substr(0, pos);
        s.erase(0, pos + delimiter.length());
    }
    cout << fixed << setprecision(20);
    cout << stof(t) / stof(s) << endl;
}
0