結果
問題 |
No.495 (^^*) Easy
|
ユーザー |
|
提出日時 | 2021-03-17 21:33:50 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 121 ms / 2,000 ms |
コード長 | 485 bytes |
コンパイル時間 | 3,460 ms |
コンパイル使用メモリ | 83,180 KB |
実行使用メモリ | 41,980 KB |
最終ジャッジ日時 | 2024-11-15 16:06:21 |
合計ジャッジ時間 | 4,658 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No00000495_Main2 { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { String s = br.readLine(); int l =0, r = 0; for(int i = 0; i < s.length()-1; i+= 5) { if("(*^^)".equals(s.substring(i, i + 5)) ) { r++; } else { l++; } } System.out.println(l + " "+ r); } }