結果
| 問題 | No.722 100×100=1000 |
| コンテスト | |
| ユーザー |
greentea011
|
| 提出日時 | 2018-10-04 13:45:21 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 361 bytes |
| 記録 | |
| コンパイル時間 | 118 ms |
| コンパイル使用メモリ | 23,168 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-12 11:11:58 |
| 合計ジャッジ時間 | 1,072 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 9 WA * 18 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
8 | printf("%d\n",a/10*b);
| ~^ ~~~~~~
| | |
| int long int
| %ld
main.cpp:17:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
17 | printf("%d\n",a/10*b);
| ~^ ~~~~~~
| | |
| int long int
| %ld
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%ld %ld", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main() {
long a,b;
scanf("%ld %ld", &a, &b);
if ((a%10==0)&&(b%10==0)) {
printf("%d\n",a/10*b);
return 0;
}
else {
long ans=a*b;
if ((ans<-99999999)||(ans>99999999)) {
printf("E\n");
return 0;
}
printf("%d\n",a/10*b);
return 0;
}
}
greentea011