結果
| 問題 |
No.495 (^^*) Easy
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-02 15:37:44 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 201 bytes |
| コンパイル時間 | 300 ms |
| コンパイル使用メモリ | 20,224 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-25 01:29:55 |
| 合計ジャッジ時間 | 679 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%s",s);
| ^~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void) {
int a = 0,b = 0,p = 0;
char s[131072];
scanf("%s",s);
while(s[p] != '#'){
if(s[p+3] == '*'){a++;}
else{b++;}
p+=5;
}
printf("%d %d\n",a,b);
return 0;
}