結果
| 問題 |
No.2415 偶数判定!Nafmoくん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-11 16:59:42 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 664 bytes |
| コンパイル時間 | 608 ms |
| コンパイル使用メモリ | 28,160 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-11 16:59:44 |
| 合計ジャッジ時間 | 1,784 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 WA * 5 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
int main(void){
// 固定サイズの配列を使用
char binarystring1[65];
char binarystring2[65];
// 標準入力からの文字列入力
scanf("%64s", binarystring1); // 最大64文字の入力を受け付ける
scanf("%64s", binarystring2);
// 2進数文字列をlongに変換
long num1 = strtol(binarystring1, NULL, 2);
long num2 = strtol(binarystring2, NULL, 2);
// num1とnum2の積を計算
long N = num1 * num2;
// 偶数か奇数かを判定して出力
if(N % 2 == 0){
printf("Even\n");
} else {
printf("Odd\n");
}
return 0;
}