結果
問題 |
No.495 (^^*) Easy
|
ユーザー |
![]() |
提出日時 | 2025-03-14 09:52:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 267 bytes |
コンパイル時間 | 505 ms |
コンパイル使用メモリ | 28,544 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-14 09:52:02 |
合計ジャッジ時間 | 1,177 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%s", str); | ~~~~~^~~~~~~~~~~
ソースコード
#include<stdio.h> #include<string.h> int main() { char str[100005]; scanf("%s", str); int len = strlen(str); int l, r; l = r = 0; for (int i = 0; i < len / 5; i++) { if (str[5 * i + 1] == '^') l++; else r++; } printf("%d %d\n", l, r); return 0; }