結果
| 問題 | No.56 消費税 |
| コンテスト | |
| ユーザー |
nanatutmc
|
| 提出日時 | 2019-09-20 00:44:50 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 121 bytes |
| 記録 | |
| コンパイル時間 | 70 ms |
| コンパイル使用メモリ | 28,616 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-03-08 16:21:08 |
| 合計ジャッジ時間 | 705 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 23 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
8 | printf("%d\n", D*(100+P)/100);
| ~^ ~~~~~~~~~~~~~
| | |
| int long int
| %ld
main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%ld %ld", &D, &P);
| ^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
main() {
long D, P;
scanf("%ld %ld", &D, &P);
printf("%d\n", D*(100+P)/100);
}
nanatutmc