結果
問題 |
No.722 100×100=1000
|
ユーザー |
![]() |
提出日時 | 2018-10-04 14:12:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 660 bytes |
コンパイル時間 | 247 ms |
コンパイル使用メモリ | 30,464 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 11:12:13 |
合計ジャッジ時間 | 1,161 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 2 |
other | AC * 24 WA * 3 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%ld %ld", &a, &b); | ~~~~~^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <math.h> int main() { long a,b; scanf("%ld %ld", &a, &b); bool isYuki=false; long aa=abs(a); long ab=abs(b); isYuki=((!isYuki)&&(aa%10==0)&&(ab%10==0)) ? true:false; isYuki=((!isYuki)&&(aa%10==0)&&(ab<10)) ? true:false; isYuki=((!isYuki)&&(aa<10)&&(ab%10==0)) ? true:false; isYuki=((!isYuki)&&(aa<10)&&(ab<10)) ? true:false; if (isYuki) { printf("%ld\n",a/10*b); return 0; } else { long ans=a*b; if ((ans<-99999999)||(ans>99999999)) { printf("E\n"); return 0; } printf("%ld\n",ans); return 0; } }