結果
問題 |
No.175 simpleDNA
|
ユーザー |
![]() |
提出日時 | 2025-03-11 10:14:16 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 323 bytes |
コンパイル時間 | 497 ms |
コンパイル使用メモリ | 25,088 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-03-11 10:14:29 |
合計ジャッジ時間 | 1,517 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 6 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d",&num); | ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ int num = 0 ,ans = 0; for(int i = 0 ; i < 5 ; i++){ scanf("%d",&num); if(i%3 == 0 && i%5 == 0){ ans += 8; }else if(i%3 == 0 && i%5 != 0 || i%3 != 0 && i%5 == 0){ ans += 4; }else{ while(num!=0){ num = num / 10; ans++; } } } printf("%d",ans); }