結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー |
![]() |
提出日時 | 2020-02-21 00:26:54 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 121 ms / 2,000 ms |
コード長 | 331 bytes |
コンパイル時間 | 367 ms |
コンパイル使用メモリ | 29,696 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-08 19:27:18 |
合計ジャッジ時間 | 2,834 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include<stdio.h>#include<string.h>int main(){char s[100005];scanf("%s", s);int i, n = strlen(s);int o, x;o = x = 0;for (i = 0; i < n; i++){if (s[i] == 'o')o++;elsex++;}for (i = 0; i < n; i++){printf("%.20lf\n", 100.0 * o / (o + x));if (s[i] == 'o')o--;elsex--;}return 0;}