結果
| 問題 | No.495 (^^*) Easy |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-04 09:02:31 |
| 言語 | Java (openjdk 27.0.1.0.3 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 234 ms / 2,000 ms |
| + 104µs | |
| コード長 | 419 bytes |
| 記録 | |
| コンパイル時間 | 2,883 ms |
| コンパイル使用メモリ | 91,456 KB |
| 実行使用メモリ | 49,432 KB |
| 最終ジャッジ日時 | 2026-11-10 14:19:24 |
| 合計ジャッジ時間 | 5,603 ms |
|
ジャッジサーバーID (参考情報) |
judge7_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 |
ソースコード
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);
}
}