結果
| 問題 |
No.858 わり算
|
| コンテスト | |
| ユーザー |
michonz4
|
| 提出日時 | 2019-12-29 19:35:08 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 192 bytes |
| コンパイル時間 | 226 ms |
| コンパイル使用メモリ | 25,088 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-01-07 14:52:43 |
| 合計ジャッジ時間 | 763 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:11:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
11 | printf("%d", a/b);
| ~^ ~~~
| | |
| int long long int
| %lld
main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%lld %lld", &a, &b);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main() {
long long a, b;
scanf("%lld %lld", &a, &b);
printf("%lld.", a/b);
for (int i=0; i<50; i++) {
a=a%b*10;
printf("%d", a/b);
}
return 0;
}
michonz4