結果
問題 |
No.128 お年玉(1)
|
ユーザー |
![]() |
提出日時 | 2025-03-27 10:01:31 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 349 bytes |
コンパイル時間 | 453 ms |
コンパイル使用メモリ | 26,880 KB |
実行使用メモリ | 8,732 KB |
最終ジャッジ日時 | 2025-03-27 10:01:38 |
合計ジャッジ時間 | 7,338 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | TLE * 1 -- * 20 |
コンパイルメッセージ
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",&money); | ~~~~~^~~~~~~~~~~~~~~ main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d",&people); | ~~~~~^~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ // 配布可能な金額 long long money = 0; scanf("%lld",&money); // 配布する人数 int people = 0; scanf("%d",&people); // 現在の総配布金額 int sum = 0; // 1000円を配布する回数 int count = 0; while(sum < money){ sum += people * 1000; count++; } printf("%d",count * 1000); }