結果
| 問題 |
No.667 Mice's Luck(ネズミ達の運)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-28 16:07:33 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 70 ms / 2,000 ms |
| コード長 | 273 bytes |
| コンパイル時間 | 134 ms |
| コンパイル使用メモリ | 29,440 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 23:28:58 |
| 合計ジャッジ時間 | 2,460 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <stdio.h>
int main(void)
{
char s[100001];
int i,o=0,x=0,a;
scanf("%s",s);
for(i=0;s[i]!='\0';i++){
if(s[i]=='o')o++;
else x++;
}
a=o+x;
for(i=0;s[i]!='\0';i++){
printf("%.7f\n",(double)o/a*100);
if(s[i]=='o')o--;
else x--;
a--;
}
return 0;
}