結果
問題 | No.495 (^^*) Easy |
ユーザー |
![]() |
提出日時 | 2017-12-17 04:44:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 210 bytes |
コンパイル時間 | 1,850 ms |
コンパイル使用メモリ | 165,904 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-15 00:24:03 |
合計ジャッジ時間 | 2,636 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 3 RE * 4 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:11:9: warning: 'r' may be used uninitialized [-Wmaybe-uninitialized] 11 | printf("%d %d",l,r); | ~~~~~~^~~~~~~~~~~~~ main.cpp:5:9: note: 'r' was declared here 5 | int l,r; | ^ main.cpp:11:9: warning: 'l' may be used uninitialized [-Wmaybe-uninitialized] 11 | printf("%d %d",l,r); | ~~~~~~^~~~~~~~~~~~~ main.cpp:5:7: note: 'l' was declared here 5 | int l,r; | ^
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ char s[17]; int l,r; scanf("%s",&s); for(int i=0;s[i];i+=5){ if(s[i]=='^')l++; if(s[i]=='*')r++; } printf("%d %d",l,r); return 0; }