結果

問題 No.495 (^^*) Easy
ユーザー gunmaken
提出日時 2017-11-03 15:49:37
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 427 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 27,776 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-22 15:27:16
合計ジャッジ時間 720 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <string.h>
#include <stdio.h>
/*
int compare(const void *a,const void *b){
    return *(int*)a - *(int*)b;
}
*/
int main(void)
{
    int i,l = 0,r = 0;
    char s[100000];
    scanf("%s",s);
    for (i = 0; strlen(s); i += 5) {
        if (s[i+1] == '^') {
            l++;
        }else if (s[i+1] == '*') {
            r++;
        }else{
            break;
        }
    }
    printf("%d %d\n",l,r);
    return 0;
}
0