結果
問題 |
No.128 お年玉(1)
|
ユーザー |
![]() |
提出日時 | 2025-03-17 11:56:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 190 bytes |
コンパイル時間 | 342 ms |
コンパイル使用メモリ | 27,392 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-03-17 11:56:14 |
合計ジャッジ時間 | 1,589 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 3 WA * 18 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:4:21: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long long int*’ [-Wformat=] 4 | scanf("%lld%d",&money,&val); | ~^ ~~~~ | | | | int* long long int* | %lld main.cpp:4:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | scanf("%lld%d",&money,&val); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ long long money,val; scanf("%lld%d",&money,&val); if(money / (val * 1000) == 0){ printf("0"); }else{ printf("%lld000",money / (val * 1000)); } }