結果

問題 No.495 (^^*) Easy
ユーザー shinwisteriashinwisteria
提出日時 2017-03-24 22:54:10
言語 Java19
(openjdk 21)
結果
AC  
実行時間 270 ms / 2,000 ms
コード長 375 bytes
コンパイル時間 6,777 ms
コンパイル使用メモリ 74,420 KB
実行使用メモリ 59,576 KB
最終ジャッジ日時 2023-09-20 02:01:29
合計ジャッジ時間 6,586 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
56,792 KB
testcase_01 AC 146 ms
56,744 KB
testcase_02 AC 152 ms
56,688 KB
testcase_03 AC 149 ms
56,464 KB
testcase_04 AC 149 ms
57,052 KB
testcase_05 AC 183 ms
56,564 KB
testcase_06 AC 270 ms
59,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Easy {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		StringBuilder str = new StringBuilder(s.nextLine());
		s.close();
		
		int l = 0,r = 0;
		while(str.length() != 1){
			if(str.charAt(1) == '^'){
				l++;
			}else{
				r++;
			}
			str.delete(0, 5);
		}
		System.out.println(l + " " + r);

	}

}
0