結果
問題 | No.495 (^^*) Easy |
ユーザー |
![]() |
提出日時 | 2017-09-28 23:54:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 499 bytes |
コンパイル時間 | 599 ms |
コンパイル使用メモリ | 68,864 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-15 18:26:53 |
合計ジャッジ時間 | 1,053 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; int max(int a, int b) { int x = (a > b) ? a : b; return x; } int min(int a, int b) { int x = (a < b) ? a : b; return x; } int main() { string s; getline(cin, s); int count = 0; int right = 0, left = 0; while (1) { if (s[count] == '#')break; if (s[count + 1] == '*') left++; else if (s[count + 3] == '*')right++; count += 5; } cout << right << " " << left << endl; return 0; }