結果

問題 No.495 (^^*) Easy
ユーザー FVRChanFVRChan
提出日時 2017-10-05 10:19:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 261 ms / 2,000 ms
コード長 443 bytes
コンパイル時間 2,251 ms
コンパイル使用メモリ 76,480 KB
実行使用メモリ 46,480 KB
最終ジャッジ日時 2024-04-28 07:27:33
合計ジャッジ時間 3,967 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
41,680 KB
testcase_01 AC 143 ms
42,092 KB
testcase_02 AC 131 ms
41,952 KB
testcase_03 AC 147 ms
42,528 KB
testcase_04 AC 148 ms
42,388 KB
testcase_05 AC 195 ms
43,744 KB
testcase_06 AC 261 ms
46,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main{
	private static Scanner sc=new Scanner(System.in);
	public static void main(String args[])throws Exception{
		String s[]=sc.nextLine().replaceAll("\\)",")/").split("/");
		String a[]={"(^^*)","(*^^)"};
		int left=0,right=0;
		for(String element:s){
			if(element.equals(a[0])==true){
				left++;
			}else if(element.equals(a[1])==true){
				right++;
			}
		}System.out.println(left+" "+right);
	}
}
0