結果
問題 | No.495 (^^*) Easy |
ユーザー |
![]() |
提出日時 | 2017-03-24 23:07:28 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 87 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 23:25:11 |
合計ジャッジ時間 | 544 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:10:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%s",w); | ^~~~~~~~~~~~~
ソースコード
#include <stdio.h>#include <string.h>int main(void){char w[100000];int i;int x=0;int z=0;scanf("%s",w);for(i=0;i<strlen(w);i++){if(w[i+1]=='^'){x++;}else if(w[i+3]=='^'){z++;}i+=4;}printf("%d %d\n",x,z);return 0;}