結果
問題 | No.495 (^^*) Easy |
ユーザー | Grenache |
提出日時 | 2017-03-24 22:25:53 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 212 ms / 2,000 ms |
コード長 | 698 bytes |
コンパイル時間 | 4,522 ms |
コンパイル使用メモリ | 72,400 KB |
実行使用メモリ | 56,784 KB |
最終ジャッジ日時 | 2023-09-20 06:55:48 |
合計ジャッジ時間 | 6,244 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 128 ms
55,940 KB |
testcase_01 | AC | 126 ms
55,720 KB |
testcase_02 | AC | 126 ms
55,700 KB |
testcase_03 | AC | 130 ms
56,036 KB |
testcase_04 | AC | 128 ms
55,528 KB |
testcase_05 | AC | 142 ms
55,784 KB |
testcase_06 | AC | 212 ms
56,784 KB |
ソースコード
import java.io.*; import java.util.*; public class Main_yukicoder495 { private static Scanner sc; private static Printer pr; private static void solve() { char[] s = sc.next().toCharArray(); int n = s.length; int l = 0; int r = 0; for (int i = 0; i < n / 5; i++) { if (s[5 * i + 1] == '*') { r++; } else { l++; } } pr.printf("%d %d\n", l, r); } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }