結果
| 問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
| ユーザー |
arrows
|
| 提出日時 | 2017-01-20 02:50:05 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 471 bytes |
| コンパイル時間 | 776 ms |
| コンパイル使用メモリ | 64,820 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-23 02:39:30 |
| 合計ジャッジ時間 | 1,216 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 12 WA * 1 |
ソースコード
#include <iostream>
using namespace std;
bool check(string& s)
{
if (s.size() > 1 && s[0] == '0') {
return false;
}
for (char ch : s) {
if (!('0' <= ch && ch <= '9')) {
return false;
}
}
return true;
}
int sum(string& A, string& B)
{
return stoi(A) + stoi(B);
}
int main()
{
string A, B;
cin >> A >> B;
cout << (check(A) && check(B) && sum(A, B) <= 12345 ? "OK" : "NG") << endl;
return 0;
}
arrows