結果
| 問題 |
No.495 (^^*) Easy
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-12 14:28:54 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 521 bytes |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 28,288 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 04:18:29 |
| 合計ジャッジ時間 | 911 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SIZE 100000
int main(void) {
int i, left, right;
char str[SIZE + 1];
char face[6], *ptr;
scanf("%s", str);
ptr = str;
left = right = 0;
face[5] = '\0';
for (;;) {
if (*ptr == '#')
break;
for (i = 0; i < 5; i++)
face[i] = *ptr++;
if (strcmp(face, "(^^*)") == 0)
left++;
else
right++;
}
printf("%d %d\n", left, right);
}