結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-03-26 21:38:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 766 ms / 2,000 ms
コード長 508 bytes
コンパイル時間 3,585 ms
コンパイル使用メモリ 72,396 KB
実行使用メモリ 66,716 KB
最終ジャッジ日時 2023-09-07 13:19:19
合計ジャッジ時間 8,161 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,680 KB
testcase_01 AC 122 ms
55,580 KB
testcase_02 AC 122 ms
55,428 KB
testcase_03 AC 130 ms
55,996 KB
testcase_04 AC 184 ms
56,492 KB
testcase_05 AC 283 ms
59,176 KB
testcase_06 AC 545 ms
61,464 KB
testcase_07 AC 766 ms
66,716 KB
testcase_08 AC 707 ms
64,864 KB
testcase_09 AC 658 ms
64,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import static java.lang.System.*;
import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	static int[] dy = {-1,0,1,0};
	static int[] dx = {0,1,0,-1};
	public static void main(String[] args) {
		String s = sc.next();
		int oNum = 0;
		int xNum = 0;
		for (int i=0; i<s.length(); i++) {
			if (s.charAt(i)=='o') oNum++;
			else xNum++;
		}
		for (int i=0; i<s.length(); i++) {
			out.println((100*oNum)/(oNum+xNum*1.0));
			if (s.charAt(i)=='o') oNum--;
			else xNum--;
		}
	}
}
0