結果
| 問題 | No.495 (^^*) Easy |
| コンテスト | |
| ユーザー |
samplelpmas
|
| 提出日時 | 2017-04-09 18:57:15 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 550 bytes |
| 記録 | |
| コンパイル時間 | 1,654 ms |
| コンパイル使用メモリ | 88,268 KB |
| 実行使用メモリ | 47,148 KB |
| 最終ジャッジ日時 | 2026-08-16 05:14:06 |
| 合計ジャッジ時間 | 3,420 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 7 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char[] emoticons = sc.next().toCharArray();
int countLeft = 0;
int countRight = 0;
for (int i = 0; i < emoticons.length; i++) {
if (emoticons[i + 1] == ')') {
countLeft ++;
} else if (emoticons[i + 1] == '^'){
countRight ++;
}
}
System.out.println(countLeft + " " + countRight);
}
}
samplelpmas