結果
| 問題 |
No.419 直角三角形
|
| コンテスト | |
| ユーザー |
AREIDO2
|
| 提出日時 | 2016-10-13 19:16:06 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 575 bytes |
| コンパイル時間 | 594 ms |
| コンパイル使用メモリ | 66,048 KB |
| 実行使用メモリ | 13,824 KB |
| 最終ジャッジ日時 | 2024-11-22 04:40:35 |
| 合計ジャッジ時間 | 49,671 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 3 |
| other | TLE * 20 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:12:17: warning: iteration 2147483646 invokes undefined behavior [-Waggressive-loop-optimizations]
12 | for(i = 1;i++;sw = 0){
| ~^~
main.cpp:12:17: note: within this loop
ソースコード
#include<cstdio>
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int a,b,i,sw;
double c;
cin >> a >> b;
a = a * a;
b = b * b;
for(i = 1;i++;sw = 0){
c = i;
if(a == b + c){
sw = 1;
}
else{
if(b == a + c){
sw = 1;
}
else{
if(c == a + b){
sw = 1;
}
}
}
}
c = sqrt(c);
printf("%f",c);
return 0;
}
AREIDO2