結果
| 問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
| ユーザー |
hanorver
|
| 提出日時 | 2016-11-18 23:04:00 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 664 bytes |
| コンパイル時間 | 502 ms |
| コンパイル使用メモリ | 70,364 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-26 07:51:05 |
| 合計ジャッジ時間 | 1,049 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 11 WA * 2 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cctype>
int main() {
std::string a, b;
std::cin >> a >> b;
if ((a.length() > 1 && a[0] == '0') || (b.length() > 1 && b[0] == '0')) {
std::cout << "NG" << std::endl;
return 0;
}
for (int i = 0; i < a.length(); i++) {
if (!isdigit(a[i])) {
std::cout << "NG" << std::endl;
return 0;
}
}
for (int i = 0; i < b.length(); i++) {
if (!isdigit(b[i])) {
std::cout << "NG" << std::endl;
return 0;
}
}
std::cout << "OK" << std::endl;
return 0;
}
hanorver