結果
問題 |
No.667 Mice's Luck(ネズミ達の運)
|
ユーザー |
![]() |
提出日時 | 2018-05-30 17:01:23 |
言語 | Java (openjdk 23) |
結果 |
TLE
|
実行時間 | - |
コード長 | 455 bytes |
コンパイル時間 | 4,243 ms |
コンパイル使用メモリ | 74,600 KB |
実行使用メモリ | 69,300 KB |
最終ジャッジ日時 | 2024-06-30 08:16:35 |
合計ジャッジ時間 | 8,945 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 TLE * 1 -- * 3 |
ソースコード
import java.util.Scanner; public class No66 { public static void main(String[] args){ Scanner s = new Scanner(System.in); String S = s.nextLine(); int N = S.length(); for(int j=0;j<S.length();j++){ int safe =0; int out = 0; for(int i=j;i<S.length();i++){ if(S.charAt(i) == 'o'){ safe++; }else{ out++; } } double safePar = ((double)safe / (safe+out)) * 100; System.out.println(safePar); } } }