結果

問題 No.495 (^^*) Easy
ユーザー FVRChan
提出日時 2017-10-05 10:19:26
言語 Java
(openjdk 23)
結果
AC  
実行時間 264 ms / 2,000 ms
コード長 443 bytes
コンパイル時間 2,283 ms
コンパイル使用メモリ 76,944 KB
実行使用メモリ 46,388 KB
最終ジャッジ日時 2024-11-16 20:59:05
合計ジャッジ時間 4,138 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

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