結果
| 問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
| ユーザー |
cww
|
| 提出日時 | 2017-02-06 22:17:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 487 bytes |
| コンパイル時間 | 1,753 ms |
| コンパイル使用メモリ | 167,252 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 08:25:40 |
| 合計ジャッジ時間 | 2,632 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(n); i++)
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
bool check( string S )
{
REP( i, (int)S.size() )
{
if( ( S[ 0 ] == '0' && S.size() > 1 ) || isalpha( S[ i ] ) )
{
return false;
}
}
int N = stoi( S );
if( N > 12345 )
{
return false;
}
return true;
}
int main()
{
string A, B;
cin >> A >> B;
cout << ( check( A ) && check( B ) ? "OK" : "NG" ) << endl;
return 0;
}
cww