結果
| 問題 |
No.495 (^^*) Easy
|
| コンテスト | |
| ユーザー |
0214sh7
|
| 提出日時 | 2017-03-24 23:04:49 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 259 bytes |
| コンパイル時間 | 218 ms |
| コンパイル使用メモリ | 22,528 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 23:14:40 |
| 合計ジャッジ時間 | 650 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%s",S);
| ~~~~~^~~~~~~~
ソースコード
#include <cstdio>
#define REP(i,n) for (int i=0;i<(n);i++)
int main(){
char S[114514];
scanf("%s",S);
int i=0;
int L=0,R=0;
while(S[i]!='#'){
if(S[i+1]=='^'){
L++;
}else if(S[i+1]=='*'){
R++;
}
i+=5;
}
printf("%d\n%d\n",L,R);
return 0;
}
0214sh7