結果
問題 |
No.780 オフ会
|
ユーザー |
![]() |
提出日時 | 2019-02-06 16:33:52 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 729 bytes |
コンパイル時間 | 212 ms |
コンパイル使用メモリ | 27,904 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-11 21:09:23 |
合計ジャッジ時間 | 779 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
// // main.c // Practice // // Created by satoshi kouguchi on 2019/02/05. // Copyright © 2019 satoshi kouguchi. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { int male_count = 0; int female_count= 0; int pair_count = 0; char alert_message[10] = {'\0'}; scanf("%d %d", &male_count, &female_count); if(male_count < female_count){ strcpy(alert_message,"YES"); pair_count = female_count - male_count - 1; } else { strcpy(alert_message,"NO"); pair_count = female_count; pair_count = male_count - female_count + 1; } printf("%s\n",alert_message); printf("%d\n",pair_count); }