結果
| 問題 |
No.495 (^^*) Easy
|
| コンテスト | |
| ユーザー |
mono1977
|
| 提出日時 | 2017-03-24 22:35:51 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 492 bytes |
| コンパイル時間 | 949 ms |
| コンパイル使用メモリ | 22,656 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 03:12:04 |
| 合計ジャッジ時間 | 1,231 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
#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;
}
mono1977