結果

問題 No.477 MVP
ユーザー sasa
提出日時 2025-03-10 13:15:00
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 212 bytes
コンパイル時間 382 ms
コンパイル使用メモリ 26,880 KB
実行使用メモリ 7,328 KB
最終ジャッジ日時 2025-03-10 13:15:02
合計ジャッジ時間 1,272 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%lld",&HP);
      |         ~~~~~^~~~~~~~~~~~
main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         scanf("%lld",&num);
      |         ~~~~~^~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(){
	// 総HP
	long long HP = 0;
	scanf("%lld",&HP);
	// MVPの人数
	long long num = 0;
	scanf("%lld",&num);
	
	long long ans = HP / (num + 1);
	
	printf("%lld",ans );
	
	return 0;
}
0