結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー NasatameNasatame
提出日時 2016-11-18 22:55:37
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 504 bytes
コンパイル時間 412 ms
コンパイル使用メモリ 56,732 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-04 18:07:32
合計ジャッジ時間 1,072 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 WA -
testcase_05 AC 2 ms
5,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;
int main(void){
    // Here your code !
    string a,b;
    cin >> a >> b;
    try{
    stoi(a,nullptr,10);
    stoi(b,nullptr,10);
    
    if( a[0] == '0' && a.size() != 1){
        if( b[0] == '0' && b.size() != 1){
            cout << "NG" << endl;
        }else{
            cout << "OK" << endl;
        }
    }else{
        cout << "OK" << endl;
    }
        
    }catch(const std::logic_error& e){
        cout << "NG" << endl;
    }
}
0