結果
| 問題 |
No.809 かけ算
|
| コンテスト | |
| ユーザー |
sasa
|
| 提出日時 | 2025-03-14 13:43:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 175 bytes |
| コンパイル時間 | 537 ms |
| コンパイル使用メモリ | 25,600 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-14 13:43:36 |
| 合計ジャッジ時間 | 3,318 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 |
| other | RE * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:18: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 2 has type ‘long int’ [-Wformat=]
5 | scanf("%ld",ans);
| ~~^ ~~~
| | |
| | long int
| long int*
main.cpp:5:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%ld",ans);
| ~~~~~^~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
long ans = 0;
scanf("%ld",ans);
for(int i = 0;i < ans;i ++){
if(ans % i == 0){
int tmp = ans / i;
printf("%d %d",i,tmp);
}
}
}
sasa