結果
問題 | No.495 (^^*) Easy |
ユーザー | Yatsuku |
提出日時 | 2017-04-04 09:02:31 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 258 ms / 2,000 ms |
コード長 | 419 bytes |
コンパイル時間 | 4,530 ms |
コンパイル使用メモリ | 73,640 KB |
実行使用メモリ | 57,336 KB |
最終ジャッジ日時 | 2023-09-22 17:04:38 |
合計ジャッジ時間 | 5,209 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 145 ms
56,580 KB |
testcase_01 | AC | 148 ms
56,664 KB |
testcase_02 | AC | 144 ms
56,888 KB |
testcase_03 | AC | 145 ms
57,208 KB |
testcase_04 | AC | 148 ms
56,792 KB |
testcase_05 | AC | 169 ms
56,804 KB |
testcase_06 | AC | 258 ms
57,336 KB |
ソースコード
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); } }