結果

問題 No.495 (^^*) Easy
ユーザー mono1977mono1977
提出日時 2017-03-24 22:35:51
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 492 bytes
コンパイル時間 554 ms
コンパイル使用メモリ 24,952 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-20 07:14:00
合計ジャッジ時間 1,459 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 0 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>

int main(){
	char face[8];
	int right=0,left=0;
	while(1){
		face[0]=getchar();
		if(face[0]=='#'){
			break;
		}
		face[1]=getchar();
		face[2]=getchar();
		face[3]=getchar();
		face[4]=getchar();
		if(strncmp(face+1,"^^*",3)==0){
			left++;
		}else if(strncmp(face+1,"*^^",3)==0){
			right++;
		}
	}
	
	printf("%d %d\n",left,right);
	
    return 0;
}
0