結果
| 問題 |
No.128 お年玉(1)
|
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2017-06-25 08:10:16 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 125 bytes |
| コンパイル時間 | 128 ms |
| コンパイル使用メモリ | 22,528 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-01 10:35:28 |
| 合計ジャッジ時間 | 906 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 WA * 16 |
コンパイルメッセージ
main.cpp:2:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
2 | main(){
| ^~~~
main.cpp: In function ‘int main()’:
main.cpp:7:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
7 | printf("%d",N/M*1000);
| ~^ ~~~~~~~~
| | |
| int long long int
| %lld
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%lld %d",&N,&M);
| ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
main(){
long long N;
int M;
scanf("%lld %d",&N,&M);
N /= 1000;
printf("%d",N/M*1000);
}
Bantako