結果
| 問題 |
No.495 (^^*) Easy
|
| コンテスト | |
| ユーザー |
bdisheoshepeha
|
| 提出日時 | 2018-08-11 11:33:27 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 359 bytes |
| コンパイル時間 | 401 ms |
| コンパイル使用メモリ | 54,860 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-23 06:08:48 |
| 合計ジャッジ時間 | 903 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 7 |
ソースコード
#include<stdio.h>
#include<string>
#include<iostream>
int main() {
int x = 0, y = 0;
std::string c;
std::cin >> c;
for (int i = 0;; i++) {
if (c[i] == '^'&&c[i+1]=='*') {
x++;
}else if (c[i] == '*'&&c[i + 1] == '^') {
y++;
}
if (c[i] == '#')break;
}
printf("(^^*)は%d個\n(*^^)は%d個", x, y);
getchar();
getchar();
return 0;
}
bdisheoshepeha