結果
問題 |
No.791 うし数列
|
ユーザー |
![]() |
提出日時 | 2019-03-14 09:40:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 446 bytes |
コンパイル時間 | 566 ms |
コンパイル使用メモリ | 63,232 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 02:58:47 |
合計ジャッジ時間 | 1,354 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 WA * 1 |
ソースコード
#include <iostream> #include <string> #include <iterator> int main() { std::string s; std::cin >> s; decltype(s)::iterator ite = s.begin(); char& c = *ite; try { if (c != '1') throw -1; ite++; for (; ite != s.end(); ite++) { c = *ite; if (c != '3') throw -1; } throw (int) (s.length()-1); } catch (int e) { std::cout << e << std::endl; } }