結果
問題 |
No.1236 長針と短針
|
ユーザー |
|
提出日時 | 2020-10-08 19:21:43 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 332 bytes |
コンパイル時間 | 1,569 ms |
コンパイル使用メモリ | 23,424 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-20 06:04:18 |
合計ジャッジ時間 | 1,070 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 11 |
コンパイルメッセージ
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("%s %s",A,B); | ~~~~~^~~~~~~~~~~~~
ソースコード
#include <cstdio> int main(){ char A[3],B[3]; scanf("%s %s",A,B); double wB=6*((B[0]-'0')*10+(B[1]-'0')); double wA=30*((A[0]-'0')*10+(A[1]-'0'))+0.50*((B[0]-'0')*10+(B[1]-'0')); double R=wA-wB+360; while(R>=360)R-=360; //printf("wa %d wb %d R %d\n",wA,wB,R); printf("%.0f",120*R/11); return 0; }