結果
問題 |
No.667 Mice's Luck(ネズミ達の運)
|
ユーザー |
![]() |
提出日時 | 2019-09-08 23:04:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 477 bytes |
コンパイル時間 | 672 ms |
コンパイル使用メモリ | 82,268 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-06-27 15:17:25 |
合計ジャッジ時間 | 4,876 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 TLE * 1 -- * 3 |
ソースコード
#include<iostream> #include<algorithm> #include <vector> #include<cmath> #include<iomanip> #include<queue> using namespace std; typedef long long int lint; int main() { string S; cin >> S; int Z=S.size(); long double co = 0; long double cx = 0; for (int ia = 0; ia < Z; ia++) { for (int ib = ia; ib < Z; ib++) { if (S.at(ib) == 'o') { co++; } else { cx++; } } cout <<setprecision(8)<< co * 100 / (co + cx) << endl; co = 0; cx = 0; } }