結果
問題 |
No.495 (^^*) Easy
|
ユーザー |
|
提出日時 | 2017-04-04 09:02:31 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 240 ms / 2,000 ms |
コード長 | 419 bytes |
コンパイル時間 | 3,160 ms |
コンパイル使用メモリ | 76,416 KB |
実行使用メモリ | 55,176 KB |
最終ジャッジ日時 | 2024-07-08 08:29:17 |
合計ジャッジ時間 | 4,747 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
ソースコード
import java.util.Scanner; public class No495 { public static void main(String[] args) { Scanner stdin = new Scanner(System.in); StringBuilder str = new StringBuilder(stdin.next()); stdin.close(); long left = 0, right = 0; while (str.length() != 1) { if (str.charAt(1) == '^') { left++; } if (str.charAt(1) == '*') { right++; } str.delete(0, 5); } System.out.println(left + " " + right); } }