結果
問題 |
No.858 わり算
|
ユーザー |
|
提出日時 | 2020-03-24 14:42:57 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 217 bytes |
コンパイル時間 | 394 ms |
コンパイル使用メモリ | 23,040 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 15:00:13 |
合計ジャッジ時間 | 1,046 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 6 WA * 1 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:4:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | scanf("%d %d",&A,&B); | ~~~~~^~~~~~~~~~~~~~~
ソースコード
#include <cstdio> int main(){ int A,B,r; scanf("%d %d",&A,&B); printf("%d.",A/B);r=(A%B)*10; for(int i=0;i<50;i++){ printf("%d",r/B); r=(r%B)*10; } printf("\n"); return 0; }