結果
問題 | No.495 (^^*) Easy |
ユーザー |
![]() |
提出日時 | 2018-09-13 13:32:18 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 334 bytes |
コンパイル時間 | 102 ms |
コンパイル使用メモリ | 27,904 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 04:22:11 |
合計ジャッジ時間 | 565 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
ソースコード
#include <stdio.h> int main(void){ char S[100001]; int face[2] = { 0 }; // face[0] : 左、face[1] : 右 scanf("%s",S); for(int i = 0; S[i] != 0; i++){ if( (S[i] == '^')&&(S[i+1] == '*') ){ face[0]++; }else if( (S[i] == '*')&&(S[i+1] == '^') ){ face[1]++; } } printf("%d %d\n",face[0],face[1]); return 0; }