結果
| 問題 |
No.128 お年玉(1)
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-07 15:17:59 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 220 bytes |
| コンパイル時間 | 734 ms |
| コンパイル使用メモリ | 24,960 KB |
| 実行使用メモリ | 8,608 KB |
| 最終ジャッジ日時 | 2025-03-07 15:18:01 |
| 合計ジャッジ時間 | 2,044 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 WA * 16 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:29: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long long int *’ [-Wformat=]
5 | int input = scanf("%d\n",&total);
| ~^ ~~~~~~
| | |
| | long long int *
| int *
| %lld
main.c:9:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
9 | printf("%d",gift*1000);
| ~^ ~~~~~~~~~
| | |
| int long long int
| %lld
ソースコード
#include <stdio.h>
void main(void){
long long int total = 0;
int input = scanf("%d\n",&total);
int children = 0;
input = scanf("%d\n",&children);
long long int gift = total/1000/children;
printf("%d",gift*1000);
}
Maeda