結果
問題 | No.495 (^^*) Easy |
ユーザー |
![]() |
提出日時 | 2017-04-15 14:13:33 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 247 bytes |
コンパイル時間 | 462 ms |
コンパイル使用メモリ | 19,456 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-18 17:54:59 |
合計ジャッジ時間 | 711 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%s", in); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> char in[100001]; int main(){ int i = 0, r = 0, l = 0; scanf("%s", in); while(in[i] != '#'){ if(in[i + 1] == '*'){r++;} else{l++;} i += 5; } printf("%d %d\n", l, r); return 0; }