結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー AQUA16573837AQUA16573837
提出日時 2018-04-06 03:19:21
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 592 bytes
コンパイル時間 452 ms
コンパイル使用メモリ 61,784 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-08 17:56:30
合計ジャッジ時間 1,629 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>
#include <algorithm>
#include <vector>
#include <deque>
#include <string>
#include <iostream>
using namespace std;
using ll = long long;

void solve();
int main() {
	solve();
#ifdef DBG
	while (true);
#endif
}

//446
void solve() {
	char A[6], B[6];
	scanf("%s %s", A, B);

	bool f = true;
	if (A[0] == '0' && A[1] != 0)
		f = false;
	if (B[0] == '0' && B[1] != 0)
		f = false;

	for (int i = 0; A[i]; i++)
		if (!('0' <= A[i] && A[i] <= '9'))
			f = false;
	for (int i = 0; B[i]; i++)
		if (!('0' <= B[i] && B[i] <= '9'))
			f = false;

	printf("%s\n", f ? "OK" : "NG");
}
0